EPUBfor any of the schemas: toxicology. 3. There’s no “ground-truth answer” to compare to. The benchmark has an expected SQL statement. However, there can be multiple ways to write a SQL query, so in reality we need to match the generated SQL’s result to the expected result. Figure 2.6 visualizes this idea: For a single data point, the AI model generated a slightly different piece of SQL but produced the exact same result. Figure 2.6 The given ground-truth SQL query may not be the only way to pull the same data. Here, our workflow (which we haven’t built yet) can generate a piece of SQL that is technically different from the given ground truth, but both yield the same table of data when run against the database. With this context in mind, let’s dive into building our workflow. The First LLM Workflow Figure 2.7 shows the workflow we will construct. The general pathway for this workflow is as follows: 1. A user has a query for a specific database (e.g., formula_1 ). 2. The query is used to grab relevant evidence (using embedding similarity). 3. An LLM is given the query and the possible evidence and generates an SQL query (using a chain-of-thought prompt). 4. The SQL query is passed to the “DB Node” to run against the database. 5. If the SQL runs, the result is shown to the user. a. Else, the workflow will show some canned response. Figure 2.7 This LLM workflow has several nodes and edges, with data being passed around between them. The ultimate goal is to generate a message and se
Rate this eBook
| File Name: | a6ec80e2676450995159e91a2d41c54c.epub |
| Original Title: | Building Agentic AI: Workflows, Fine-Tuning, Optimization, and Deployment (for Duc Ka) |
| Creator / Author: | Sinan Ozdemir |
| Language: | English (en) |
| Identifier: | ASIN:465652 |
| Publisher: | Sinan Ozdemir Publishing |
| Category: | Non-fiction |
| Format: | 📗 EPUB eBook |
| File Size: | 3.5 MB |




.jpg)