Models, Retrieval, Tools, and Control Flow
Language AI HandbookAll chapters A shopper asks whether the Trail Runner is available in size 10 for under $120. A catalog can tell the assistant which products fit the request. A stock lookup can tell it whether the size is in stock. If that lookup fails, the assistant can still show matching products and their catalog prices. The inventory part of the answer then stays explicitly unknown.
Zaharia and colleagues use compound AI system for systems that solve a task with interacting components such as models, retrievers, and tools. Here we build a small version with explicit application control flow. A deterministic model stub proposes a query plan and formats an answer. Application code chooses the next step and checks what the stub proposed. The inventory fixture holds fictional counts in memory. Each example runs offline with the repository's Python 3.11 notebook runtime.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!