Next.js Discord

Discord Forum

ai chatbot - data analysis

Unanswered
Bananaquit posted this in #help-forum
Open in Discord
BananaquitOP
i have a postgres db of chess games. it has turn-by-turn plays, with other information like the players, time, game id, etc.
i want to build an ai chatbot using vercel ai sdk where if someone asks a question about a particular game, the ai will know which game to filter for and give analysis on.

example prompts:
- what's the last 5 first turn moves for x player when white?
- what's x player's winrate over the past 15 games?

from what i understand, using rag chatbot to embedd custom data is more appropriate for stuff that can be semantically searched, like specific rules. but, although i gave some aggregation examples, i'd ideally want the bot to be able to pull the ful data of a game and do analysis on it if requested. similar to if i c/p'd the data and send it to chatgpt and asked questions about it, it'd give an answer on that data.

pls help!

1 Reply