tshu-w / DBCopilot

Code and data for the paper "DBCᴏᴘɪʟᴏᴛ: Scaling Natural Language Querying to Massive Databases"
50 stars 7 forks source link

Can you please provide an example? #1

Open IamExperimenting opened 8 months ago

IamExperimenting commented 8 months ago

Hey team, thanks for this amazing paper. Can you please also provide us some examples so we can understand how to integrate with our database and LLM models(OpenAI)

Thanks

tshu-w commented 8 months ago

Hello, thank you for your interest.

To train a router suitable for your database, you need to: 1. build a schema graph, 2. use the schema questioning model to ask questions about sampled schemas, and 3. train the schema router on synthesized data. After that, for a new question, use the schema router to navigate the schema, and then provide the question and schema together to LLMs like OpenAI. For a detailed process, please refer to the paper. I have been quite busy recently, so there won't be a demo in this month.