Back to catalog
Prompt Chain OpenAI Cookbook 4.0 (1) 0
Add to Favorites

Intro

This notebook is an example on how you can use SingleStoreDB vector storage and functions to build an interactive Q&A application with ChatGPT. If you start a [Trial](https://www.singlestore.com/cloud-trial/) in SingleStoreDB, you can find the same notebook in our sample notebooks with native connection.

Intro

This notebook is an example on how you can use SingleStoreDB vector storage and functions to build an interactive Q&A application with ChatGPT. If you start a Trial in SingleStoreDB, you can find the same notebook in our sample notebooks with native connection.

First let's talk directly to ChatGPT and try and get back a response

Let's connect to OpenAI and see the result we get when asking for a date beyond 2021

Get the data about Winter Olympics and provide the information to ChatGPT as context

1. Setup

Step 1 - Grab the data from CSV and prepare it

2. Set up SingleStore DB

3. Populate the Table with our dataframe df and use JSON_ARRAY_PACK to compact it

4. Do a semantic search with the same question from above and use the response to send to OpenAI again

5. Send the right context to ChatGPT for a more accurate answer

6. Get an answer from Chat GPT

Comments (0)

Sign In Sign in to leave a comment.