3 ms·
One Problem I always see in such apps is that the ai can't see in to the database or into all entries, so queries without stating data EXACTLY as in the databas
by K0IN 3y ago
One Problem I always see in such apps is that the ai can't see in to the database or into all entries, so queries without stating data EXACTLY as in the database run into issues.
example: give me the revenue for all logistics firms
but in the database these might not be called "logistics" and may be called "transport" (or anything)
maybe there are some counters to this like finding unique values per column or even better use a grammar based approach, wich will select only valid entries.
but the simple text to SQL is at this point not the "hard thing to solve"
- bm-rf 3y agoUsually you include the database schema in the context, usually by showing the CREATE statement for the tables you want to query. I've also found that including comments in the CREATE sql can guide the model somewhat. The best approach is probably to finetune one of these models using curated questions for your database.