Models, Retrieval, Tools, and Control Flow

Michael BrenndoerferDecember 2, 20262 min read
Language AI HandbookAll chapters
Part 64 of 67Compound AI System Design
Chapter 485Models, Retrieval, Tools, and Control Flow
Reading section 1 of 11 · Models, Retrieval, Tools, and Control Flow · 2 minSection 1 of 11 · 2 min

Section 1 of 11 · 2 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

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!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy