Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.17 KB

README.md

File metadata and controls

41 lines (27 loc) · 1.17 KB

NBA-chatbot

NBA-chatbot implements a Retrieval-Augmented Generation (RAG) chatbot for NBA statistics.

Ingest

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.

Example

Generate and store embeddings for statistics in stats/player-per-game.csv:

$ ingest 'stats/player-per-game.csv'

Server

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.