SeaBot API

SeaBot API

SeaBot API is a high-performance RAG (Retrieval-Augmented Generation) backend that powers intelligent search and an AI docs assistant — crawling official documentation sites like Hono and answering questions grounded in their content.

buntypescriptcrawleetypesenseqdranthuggingfacelangchainhonoredisgemini

Architecture

SeaBot API architecture

Problem it solves

LLMs have no knowledge of private or up-to-date documentation, so generic answers hallucinate and developers can't trust them — teams need search and chat that cite their own docs.

How it works

Crawlee crawls documentation pages and splits them into chunks. Chunks are vectorized with Qwen2-7B-Instruct (via Hugging Face) and stored in Qdrant, while metadata is indexed in Typesense for keyword search. Queries run a hybrid Typesense + Qdrant retrieval, results are reranked with a cross-encoder, and Gemini 2.5 Flash generates the final answer from the reranked context. Redis caches repeated queries and conversations.

Approach

I built a modular Hono service on Bun with a clean module layout (indexing, embeddings, qdrant, search, rag, cache), a Crawlee ingestion pipeline, hybrid search, cross-encoder reranking, and Redis caching so the whole flow stays fast and cheap at scale.