NBA-chatbot implements a Retrieval-Augmented Generation (RAG) chatbot for NBA statistics.
Ingest ingests NBA statistics and generates embeddings.
Usage:
ingest file
The mxbai-embed-large model generates embeddings for each row in the provided CSV file. The PostgreSQL database stores these embeddings along with all the statistical data. The PostgreSQL database requires the pgvector extension to store embeddings.
Generate and store embeddings for statistics in stats/player-per-game.csv
:
$ ingest 'stats/player-per-game.csv'
Server is an HTTP server for NBA statistics.
The /player-per-game
endpoint returns statistics for the nearest player
to the provided question.
The mxbai-embed-large model generates embeddings for questions. The server queries the PostgreSQL database for related embeddings and statistical data. The PostgreSQL database requires the pgvector extension to query embeddings. The llama3 model generates responses to constructed prompts.