Skip to content
A

Anugamana

Ancient Wisdom, Modern Clarity

Created on 1st February 2026

•

A

Anugamana

Ancient Wisdom, Modern Clarity

The problem Anugamana solves

The Modern Emotional Dilemma

In today’s fast-paced world, people frequently encounter complex emotional struggles—burnout, anxiety, confusion about duty, or a lack of purpose. Ancient wisdom texts such as the Bhagavad Gita contain profound insights that address these issues, but accessing and applying that wisdom is often difficult for the modern seeker.


The Disconnect

1. Keyword Mismatch

A person experiencing imposter syndrome may not think to search for terms like self-doubt or Karma Yoga.
Traditional keyword-based search systems fail to capture the deeper semantic meaning of human emotions, leading to irrelevant or missed results.

2. Interpretative Barrier

Even when a relevant verse is found, archaic language and metaphorical depth can make it difficult to relate the teaching to modern scenarios—such as workplace deadlines, academic stress, or relationship conflicts.

3. Information Overload

Scrolling through hundreds of verses to find a single moment of clarity can be overwhelming, especially when the user is already stressed or emotionally fatigued.


How Anugamana Solves It

Anugamana functions as an intelligent spiritual bridge that makes ancient wisdom accessible, searchable, and actionable.

Semantic Understanding over Keywords

By using a Hybrid Search Architecture (Vector Search + BM25), Anugamana understands intent and emotion rather than relying solely on exact words.
For example, a query like “I feel overwhelmed by pressure” can surface verses about duty and detachment—even if those exact terms are never used.

Personalized, AI-Generated Guidance (RAG)

Anugamana does more than retrieve text—it interprets it.
Using Google Gemini 2.5 Flash, the system generates personalized explanations that connect ancient verses directly to the user’s modern context. This converts abstract philosophy into concrete, actionable guidance.

Precision through Re-Ranking

A Cross-Encoder Re-Ranking Model refines search results to ensure the “Best Match” truly aligns with the user’s emotional state rather than being a loose statistical approximation.


Impact

Anugamana democratizes spiritual counseling.
It enables anyone—regardless of familiarity with Sanskrit or scriptural study—to access immediate, context-aware solace and clarity. Moments of panic are transformed into moments of introspection, reflection, and purposeful action.

Challenges we ran into

1. Integrating the New Gemini SDK with FastAPI (Async vs. Sync)

One of the primary challenges was integrating the updated google-genai SDK into an asynchronous FastAPI environment.
By default, content generation calls are blocking, which posed a risk of freezing the entire server under high traffic conditions.

The Fix

  • Leveraged FastAPI’s run_in_threadpool utility.
  • Offloaded blocking client.models.generate_content calls to a separate worker thread.
  • Ensured the main event loop remained non-blocking and responsive while the LLM generated spiritual guidance.
  • Result: Improved scalability and prevented request bottlenecks during concurrent usage.

2. Tuning Hybrid Search (Vector + BM25)

Achieving a true “best of both worlds” search experience proved more complex than anticipated.

  • Pure Vector Search (ChromaDB):

    • Strength: Excellent at understanding emotional or semantic queries.
    • Weakness: Occasionally missed precise Sanskrit or domain-specific keywords.
  • BM25 Keyword Search:

    • Strength: Accurate for exact terms and scriptural vocabulary.
    • Weakness: Struggled with abstract emotional phrasing such as “overwhelmed” or “sadness.”

The Fix

  • Implemented Reciprocal Rank Fusion (RRF) manually to merge and normalize scores from both systems.
  • Tuned the k constant to 60 to balance influence between semantic and keyword matches.
  • Prevented scenarios where:
    • A strong keyword match overshadowed a meaningful semantic result.
    • A vague semantic match displaced a highly relevant exact term.

3. Balancing Latency with RAG Quality

Initially, generating AI advice for every retrieved verse introduced significant latency, resulting in a sluggish user interface and increased API costs.

The Fix

  • Optimized the pipeline to perform the Generative AI step only on the top-ranked result (limit = 1) after re-ranking.
  • Provided users with instant verse lists while reserving deep, personalized interpretation for the most relevant match.
  • Outcomes:
    • Reduced response time.
    • Lowered API quota consumption.
    • Maintained high-quality, context-aware guidance without degrading user experience.

Overall Outcome

These optimizations collectively improved:

  • System Responsiveness
  • Search Relevance Accuracy
  • Cost Efficiency
  • User Experience Consistency

The final architecture achieved a balance between performance, precision, and personalization without compromising scalability.

Tracks Applied (1)

Open Track

Anugamana aligns strongly with the Open Track because it combines originality, technical depth, and broad human impact r...Read More

Discussion

Builders also viewed

See more projects on Devfolio