Chapter 2 (Part 2) Knowledge Retrieval Engine
2.6 Why Retrieval Is Necessary A Large Language Model only knows what was available during its training. If the user asks about something that changed after the model was trained, the model may not know the latest information. Instead of forcing the language model to guess, ACAI first determines whether external information is required. User Prompt │ ▼ Need External Knowledge? │ ┌────┴────┐ │ │ No Yes │ │ ▼ ▼ Continue Search Engine │ ▼ Document Ranking │ ▼ Source Selection │ ▼ Context Builder Internal Workflow The Retrieval Engine performs several sequential operations: Stage 1 — Query Generation The original user prompt is transformed into one or more optimized search queries. Example User Prompt Explain quantum computing. Generated Queries Quantum computing basics Quantum computing architecture Quantum algorithms Quantum hardware Instead of searching only once, multiple optimized queries increase the chance of retrieving relevant information. Stage 2 — Source Collection The ret...