Spaces:
Sleeping

benny4982 Claude Opus 4.6 commited on
Commit
08f87f1
·
1 Parent(s): 8fb1dc9

Implement core RAG pipeline: PDF parsing, vector index, and rule expert

Browse files

- src/ingestion/pdf.py: PyMuPDF-based PDF parser with section detection
and token-aware chunking (~500 tokens, 50 overlap)
- src/rag/vectorstore.py: ChromaDB vector store with OpenAI embeddings
(text-embedding-3-small), build and retrieve functions
- scripts/build_index.py: End-to-end pipeline script (PDF → chunks → index)
- src/expert/query.py: Rule expert using RAG + Claude API (Sonnet)
with structured answers and source citations
- prompts/expert/base.md: Add language-matching instruction
(answer language matches question language)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

5 files changed +421 -61
Files changed (5)
prompts/expert/base.md+1
scripts/build_index.py+29-17
src/expert/query.py+99-11
src/ingestion/pdf.py+187-24
src/rag/vectorstore.py+105-9