Assistant with text-to-SQL Performance

This is an easy one.

Start with the above. That’s the basics. Define your schema. But as has been stressed again and again above, you’ve got to do it in a way that clearly explains to the LLM how to respond to the questions it will get.

Look at the example from above:

Here is a case where, above and beyond the schema, you ALSO explain to the LLM:

  • Queries with respect to users and sales orders will use the sale_order table
  • The user id in the sales_order table is the partner_id field
1 Like