ThinkAi is an LLM-based chatbot trained on philosophical texts using InstructGPT embeddings, Chroma's Vector Search, LangChain tokenizers for text chunking, Meta's bart-large-cnn
model for summarizing, and OpenAI's gpt-3.5-turbo
model for structuring the final response. This is wrapped with a NextJS web app hosted completely on AWS (AWS Amplify, AWS Elastic Beanstalk, and AWS EC2)
Here is how ThinkAi processes each user query;
- User pings the web client with a query.
- Chroma DB creates embeddings for this query
- Using vector search, Chroma DB pulls the most relevant articles for the query
- The summaries for these articles is pulled from the preprocessed
JSON
file from below and are combined by simple concatenation - The combined text is included in prompt for
OpenAI GPT model
- API call to OpenAI
gpt-3.5-turbo
model and get response - Response is sent back to the user