One Piece AI Chatbot #
This project demonstrates how I built a Retrieval-Augmented Generation (RAG) chatbot using structured data.
Problem #
How can we build a chatbot that answers domain-specific questions accurately without hallucinating?
Solution #
I built a RAG system using:
- Structured Markdown data
- Vector embeddings
- Semantic retrieval
- Large Language Model (LLM)
How it works #
- Data was collected and structured into Markdown
- Content was split into smaller chunks
- Each chunk was embedded into a vector database
- User queries are matched with relevant chunks
- The LLM generates answers based on retrieved context
Data structure #
The dataset is divided into:
- Characters
- Arcs
- Devil Fruits
Example:
# Character: Monkey D. Luffy
## Role
Captain
## Abilities
- Rubber powers
- HakiResults #
The chatbot can answer:
- Character information
- Story arcs
- Abilities and powers
With improved accuracy compared to a standard LLM.
What I learned #
- Structuring data for AI systems
- Importance of chunking
- Prompt engineering basics
- Retrieval optimization
Improvements #
- Custom frontend instead of iframe
- More data sources
- Metadata filtering