txtai supports both natural language queries
Tell me a feel good story Show me stories about wildlife Sports stories about hockey
and SQL statements
select * from txtai where similar("Tell me a feel good story") and entry >= date('now', '-1 day')
This model bridges the gap between the two and enables natural language queries with filters.
Tell me a feel good story since yesterday Show me sports stories since yesterday with team equal Red Sox Breaking news summarized Breaking news translated to fr
This model is an example of creating a custom query syntax that can be translated into SQL txtai can understand. Any query syntax can be created. This one supports English but a similar strategy can be deployed to support other languages. Natural language can be translated to functions, query clauses, column selection and more.
See t5-small-bashsql for a model that translates Bash like commands into txtai SQL.
This model was trained using scripts that can be found here.
Steps to train:
python generate.py txtsql.csv python train.py txtsql.csv t5-small-txtsql
- Downloads last month