pagepiper/app
pyr0ball 3765fbc0f9 fix: quote-first prompt structure + escape phrase post-processing to kill hallucinations
three-layer approach to stop 7B model from supplementing retrieved context
with training-data knowledge:

1. system prompt redesigned: 'no memory of books/stories/authors' eliminates
   the model's self-permission to draw on parametric knowledge

2. quote-first prompt structure: model must commit to a specific quoted passage
   before generating an answer — explicit NOT FOUND required when excerpts lack
   the answer, preventing the 'excerpt doesn't say X... however in the series...'
   escape pattern

3. _strip_escape() post-processor: catches any residual leakage by scanning for
   known escape phrases ('in the series', 'by terry goodkind', 'it can be assumed',
   etc.) and replacing the response with the canned no-answer message
2026-05-06 10:30:11 -07:00
..
api feat: RAG retrieval quality, artifact cleaning, and ingestion progress UI 2026-05-06 08:25:58 -07:00
services fix: quote-first prompt structure + escape phrase post-processing to kill hallucinations 2026-05-06 10:30:11 -07:00
__init__.py feat: add database schema and migration runner 2026-05-04 17:10:38 -07:00
config.py feat: RAG retrieval quality, artifact cleaning, and ingestion progress UI 2026-05-06 08:25:58 -07:00
deps.py feat: RAG retrieval quality, artifact cleaning, and ingestion progress UI 2026-05-06 08:25:58 -07:00
main.py feat: RAG retrieval quality, artifact cleaning, and ingestion progress UI 2026-05-06 08:25:58 -07:00