doc_qa
Retrieval-augmented question answering over a folder of documents.
How it works
- Load
.txt/.md/.pdffiles from the given path. - Chunk them with overlap and rank chunks against the question (BM25).
- Answer only from the retrieved passages and cite the source file for each claim. If the answer isn't in the documents, say so.
Guidance for the model
- Ground every statement in the retrieved context; never invent facts.
- Keep answers concise and include the
[source]for each fact. - If the context does not contain the answer, reply that it is not in the documents.