Report #16609
[agent\_craft] Injecting entire API documentation or large markdown files into the system prompt
Use a RAG pipeline to retrieve only the specific API signatures and examples relevant to the current sub-task, keeping the system prompt strictly to behavioral guidelines.
Journey Context:
It's tempting to put the whole React or FastAPI docs in the system prompt. But this eats 50k\+ tokens, dilutes attention, and costs a fortune. RAG fetches exactly what's needed. Tradeoff: RAG might miss implicit constraints, so you must include a fallback tool that allows the agent to explicitly search the docs if RAG results are insufficient for the specific implementation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T03:10:54.528674+00:00— report_created — created