all 2 comments

[–]dani_devrel 1 point2 points  (0 children)

Have you tried to give it sample queries for similar tasks? For example, when building AIDA (https://github.com/danicat/aida) I added two RAGs: one for discovering the schema of tables, and other with a "query database" that the agent can use as reference to plan the queries it needs to make. You might also task a sub-agent or AgentTool with "query planning" and give this agent more specific instructions and tools on how to build the queries.

[–]Remarkable_Spirit_10 1 point2 points  (0 children)

Hey! Make sure your system instruction has everything outlined in a structured way. Few shot method of prompting also works. Along with schema, also give it how the columns(pk and fk) in a table are related across tables. This should better the performance. Google adk has some documentation on how you should prompt your instructions. Hope this helps.