Anima
Find your next obsession
Next.jsExpress.jsTypeScriptgraphqlPostgresSQLollamahuggingface-modelsqdrantRAGDockerDigital OceanTanstack-QueryTailwind CSSCodegen
View Mode:
1. Problem Statement
What?
Anime fans and manga readers face significant friction when trying to discover shows or chapters based on their specific, nuanced intent (e.g. 'anime with god-level protagonist', 'vikings in the old age', or specific scenes and atmospheres) because traditional platforms are constrained to exact-match keyword indexing or genre tags.
Who?
Anime fans, manga readers, and curators seeking intent-based rather than keyword-restricted content discovery.
Why it mattered?
When a user forgets a title but remembers a specific thematic motif, emotional arc, or character style, standard keyword matching on descriptions fails to return relevant suggestions.
2. Product Thinking
The Solution
Built Anima, an intent-driven search engine indexing 14,000 anime series. Users query using natural language representing their scene-level or character-archetype intent, which is translated into multi-vector queries. The system consumes the Anilist GraphQL API for displaying current metadata, trending lists, and manga filters, offering an intent-driven search experience superior to conventional databases.
Alternatives Considered
- •Anilist / MyAnimeList (Limited to hardcoded tags, genres, and exact text search)
- •General Search Engines (Lacks structural anime metadata, ratings, and filters)
Trade-offs Made
- •Infrastructure vs. Billing: Powering dense multi-vector embeddings, cross-encoding, and re-ranking requires high compute. To keep billing costs low, the compute runs on cheap instances, resulting in a search latency bottleneck of up to 2 minutes, requiring custom batch-processing and client feedback.
- •Cloud Deployment vs. Local: The stack relies on multiple heavy Docker containers (Qdrant, Ollama, model runners) which necessitates cloud container hosting (DigitalOcean) for production, though developers can clone it locally for testing.
3. System Architecture
Next.js Frontend
Frontend
Next.js API
Backend
Anilist GraphQL
External
Postgres DB
Database
Qdrant Vector DB
Database
Cloud AI Services
Backend
Frontend
Backend
Database
Hover over components to see details. This diagram is interactive.
4. Impact & Outcome
Summary
Designed and built an intent-based semantic search engine indexing 14,000 anime, utilizing multi-vector dense retrieval, cross-encoder re-ranking, and integration with the Anilist GraphQL API.
Key Impact
- ✓Enabled highly accurate semantic search over 14,000 titles by indexing tag-specific dimensions.
- ✓Implemented weighted multi-vector search combining synopsis, protagonist archetypes, world elements, and conflict types.
- ✓Applied cross-encoding re-ranking and MMR (Maximal Marginal Relevance) diversity scoring to ensure optimal, non-redundant search relevance.
- ✓Integrated Anilist's GraphQL query endpoint to seamlessly fetch trending, popular, and seasonal lists in real time.
Outcome
Delivered a fully working semantic search pipeline demonstrating proficiency in vector databases (Qdrant), Docker deployments, GraphQL API integrations, and machine learning search logic.
5. Challenges & Failures
What Broke
Simple vector searches on descriptions returned irrelevant hits for queries specifying character details or relationships.
Lesson Learned
Iteratively refined the pipeline from basic vector search to multi-vector weighted search, then added cross-encoding re-ranking and Maximal Marginal Relevance (MMR) diversity scoring.
What Broke
Deploying high-compute semantic search models (Ollama, cross-encoders) on low-cost cloud setups without exceeding resource limits.
Lesson Learned
Segregated the architecture: hosted Next.js on Vercel, placed Postgres and Qdrant on persistent cloud instances, and optimized Ollama containers to use CPU-friendly quantized models.
6. Outcome & Learnings
Key Learnings
- →Semantic search requires more than simple embeddings; re-ranking, cross-encoding, and MMR diversity are vital for production-grade relevance.
- →Structuring multi-vector payloads in Qdrant dramatically improves search precision for multi-dimensional data.
- →Building AI-powered developer products requires balancing model precision with infrastructure hosting costs.
What I'd Improve Next
- ○Implement narrative-search to allow search queries based on complex storyline arcs.
- ○Build a conversational multi-agent recommender system using Qwen2.5:5b.
- ○Explore scene-level video search using CLIP models and temporal frame extraction.