>"Enterprise Document Intelligence โ A fixed BASE, the rules each question needs, one registry: the dispatcher that turns a parsed question into a typed LLM call"
Instead of "mega-prompts," use a Dispatcher Pattern to assemble a `BASE` prompt with specific fragments (shape and constraints) at runtime. This improves accuracy, simplifies maintenance, and aids auditing.
* Modular Prompting: Uses "shape fragments" (formatting/extraction) and "constraint fragments" (specific rules).
* Execution Modes: Combined (sends all chunks at once) vs sequential (Iterative chunk processing to save costs)
* Structural Scoping: Uses query hints (e.g., page numbers) to refine retrieval.
* Best Practices: Use Temperature 0, maintain a 20โ30% context window buffer, and log raw model responses.