llama_index icon indicating copy to clipboard operation
llama_index copied to clipboard

Improve text-to-sql performance with updated prompt and stop token

Open ekzhu opened this issue 2 years ago • 1 comments

  1. On spider benchmark dev set, execution accuracy increased to 70% from 50% (on a 1% sample queries).
  2. Added stop_token to Prompt class to allow new prompts to specify when to ask LLM to stop generation. Particularity useful when you ask LLM to generate items 1, 2, 3 but only want item 1, and items 2 and 3 are just there due to prompt engineering.
  3. Updated text-to-sql prompt which utilizes stop_token.
  4. Use ChatGPT instead of davinci for running benchmark to save $$$
  5. Add foreign keys to table context in structured index.

ekzhu avatar Mar 14 '23 07:03 ekzhu

@ekzhu quick question: how does the performance of ChatGPT compare to davinci in your experience?

Disiok avatar Mar 14 '23 15:03 Disiok

@ekzhu quick question: how does the performance of ChatGPT compare to davinci in your experience?

Let's test it

ekzhu avatar Mar 16 '23 04:03 ekzhu