Skip to content

Commit 2d50f4e

Browse files
committed
Update readme
1 parent 1b4333b commit 2d50f4e

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

text_2_sql/README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,20 @@ As the query cache is shared between users (no data is stored in the cache), a n
5454

5555
![Vector Based with Query Cache Logical Flow.](./images/Agentic%20Text2SQL%20Query%20Cache.png "Agentic Vector Based with Query Cache Logical Flow")
5656

57-
#### Parallel execution
57+
## Agents
58+
59+
This agentic system contains the following agents:
60+
61+
- **Query Cache Agent:** Responsible for checking the cache for previously asked questions.
62+
- **Query Decomposition Agent:** Responsible for decomposing complex questions, into sub questions that can be answered with SQL.
63+
- **Schema Selection Agent:** Responsible for extracting key terms from the question and checking the index store for the queries.
64+
- **SQL Query Generation Agent:** Responsible for using the previously extracted schemas and generated SQL queries to answer the question. This agent can request more schemas if needed. This agent will run the query.
65+
- **SQL Query Verification Agent:** Responsible for verifying that the SQL query and results question will answer the question.
66+
- **Answer Generation Agent:** Responsible for taking the database results and generating the final answer for the user.
67+
68+
The combination of this agent allows the system to answer complex questions, whilst staying under the token limits when including the database schemas. The query cache ensures that previously asked questions, can be answered quickly to avoid degrading user experience.
69+
70+
### Parallel execution
5871

5972
After the first agent has rewritten and decomposed the user input, we execute each of the individual questions in parallel for the quickest time to generate an answer.
6073

@@ -189,22 +202,9 @@ Below is a sample entry for a view / table that we which to expose to the LLM. T
189202
}
190203
```
191204

192-
See `./data_dictionary` for more details on how the data dictionary is structured and ways to **automatically generate it**.
193-
194-
## Agentic Vector Based Approach (Iteration 5)
195-
196-
This approach builds on the the Vector Based SQL Plugin approach that was previously developed, but adds a agentic approach to the solution.
197-
198-
This agentic system contains the following agents:
199-
200-
- **Query Cache Agent:** Responsible for checking the cache for previously asked questions.
201-
- **Query Decomposition Agent:** Responsible for decomposing complex questions, into sub questions that can be answered with SQL.
202-
- **Schema Selection Agent:** Responsible for extracting key terms from the question and checking the index store for the queries.
203-
- **SQL Query Generation Agent:** Responsible for using the previously extracted schemas and generated SQL queries to answer the question. This agent can request more schemas if needed. This agent will run the query.
204-
- **SQL Query Verification Agent:** Responsible for verifying that the SQL query and results question will answer the question.
205-
- **Answer Generation Agent:** Responsible for taking the database results and generating the final answer for the user.
206-
207-
The combination of this agent allows the system to answer complex questions, whilst staying under the token limits when including the database schemas. The query cache ensures that previously asked questions, can be answered quickly to avoid degrading user experience.
205+
> [!NOTE]
206+
>
207+
> - See `./data_dictionary` for more details on how the data dictionary is structured and ways to **automatically generate it**.
208208
209209
## Tips for good Text2SQL performance.
210210

0 commit comments

Comments
 (0)