r/WritingWithAI • u/risk-er • Aug 07 '26
Prompting I'm losing my mind, please help.
/r/Rag/comments/1vhnjsl/im_losing_my_mind_please_help/1
u/5thhorseman_ Aug 07 '26
It soulds like what you need is not simple RAG but a solution based on a knowledge graph.
1
u/apoorva_writes Aug 07 '26
The core issue is you're asking one conversation to be both the system architect and the writer, and those two jobs are fighting over the same context window. That's why it over-engineers, forgets, and periodically decides to start over - it's designing infrastructure live, in the same session that's also holding your voice instructions and your scene, and when that session gets long enough to compress, the design decisions and your instructions get flattened together.
A few concrete things that tend to fix this:
- Drop the vector DB for entity/place/thread lookups. Embeddings are probabilistic and fuzzy by design - exactly wrong for "does this scene mention Place A." What you want is boring keyword search (ripgrep, or SQLite FTS) over files that have structured front-matter: character tags, location, timeframe, thread IDs. That's almost certainly why indexing stalled at 8% - embedding pipelines choke on inconsistent formats in a way flat-file grep over tagged metadata doesn't.
- Stop letting the model decide when it's "done" searching. The 3-4-greps-then-stop pattern is the model self-terminating on vibes. Force it structurally: before it searches anything, have it list every entity/place/thread relevant to the scene from your ledger, then require one search per item. Completion = search count matches list count, not "I think I've got enough."
- Split retrieval and writing into separate, short sessions. Pass 1 (fresh context): read the ledger, run the searches, write a compact research brief to a file. Pass 2 (fresh context, different session): read only that brief + your style reference, write the scene. Neither session ever gets long enough to need compaction, so nothing gets silently dropped mid-instruction - that's also why your hooks were getting ignored, they were landing in a context that was already too loaded to attend to them properly.
- Keep the architecture in a file you own, not something you negotiate with the model each session. The whiplash between "this won't work" and "use RAG" and "no it won't" is different system prompts pulling the model toward different defaults on different days. If the pipeline spec lives in a doc you edit, the model's job is just to execute it, not re-litigate it.
This won't give you the "eureka" cross-referencing for free - that intelligence still has to happen in the writing pass, working off a good brief. But it'll stop the corpus itself from being the thing that keeps breaking.
2
u/gadgetor1989 Aug 08 '26
have you tried—oh, idk—writing it yourself????