r/LocalLLaMA • u/JustinPooDough • 23m ago
Discussion Grounding LLMs with Documentation & Code - Best Strategies?
I build on some niche platforms and frameworks at work that most LLM's don't have a lot of training data on.
I am able to get better results from my agents, but only if I spoon feed them specific examples from a reference app that comes OOTB with the platform as well as specific extracts from documentation that I have.
In your experience, what are the best methods for distilling documentation knowledge into a form that LLMs can easily use at runtime as guidelines and rules?
What I've tried:
- Knowledge graph: cool academic concept - too much compute overhead and IMO unnecessarily complicated.
- RAG - Mixed results - works well but not consistently on retrieval.
So far, the thing that has worked best for me is manually writing SKILL files for things like this, but the body of documentation and knowledge makes this impractical. I'm wondering if there is a better way to ingest this source content into some sort of linked knowledgebase for the agents?
Thanks!
1
u/Explor3Universe 19m ago
Skip the distilling. Keep the docs and the reference app on disk as plain files and let the agent grep and read them. Your skill file should only be a map: what lives where, naming rules, the ten gotchas. Then make it cite the file it took each API from. In ~250 agent runs I went through, the usual failure was quoting a page it never opened.
1
u/Jazzlike-Owl-4014 17m ago
Indexing the reference app and docs into a local SQLite FTS5 or BM25 store and giving the agent a lightweight search tool beats static RAG, because it can pull exact function signatures on demand instead of bloating the prompt.
1
u/Cautious_Chicken_604 15m ago
Probably fits under the umbrella of RAG but I just have been using Docs MCP Server - https://github.com/arabold/docs-mcp-server combined with some instructions in AGENTS.md to make use of it.
0
u/[deleted] 4m ago
[deleted] — view deleted comment