Skip to content

Arghya (Shop Assistant)

Scope

Arghya is the ritual shopping assistant for pujas and festivals. It must:

  • Convert natural-language intent into ritual-specific item bundles (festival/deity/ritual → samagri).
  • Offer three priced tiers per plan: Standard, Frugal, Minimal with transparent diffs and savings.
  • Enforce ritual constraints and regional/sampradāya variants; never drop mandatory items.
  • Perform adaptive substitution under budget/stock constraints with purity rules (material tiering brass→steel→clay, pack sizes, house-brand preference).
  • Handle cart ops end‑to‑end: add, replace, remove, checkout, tax/shipping.
  • Track perishables vs durables for replenishment cadence; predict refills from usage + calendar.
  • Personalize by region, language, household size, incense strength, allergies, reusables, prior purchases.
  • Run proactive reminders via festival calendar (e.g., Navaratri/Diwali pre‑bundles 10 days prior).
  • Support multimodal, multilingual UX (text/voice) with first-class Telugu + English converser

Technical Components

AI Components

  • Conversational Orchestrator — AI: Chatbot Agent
    Manages dialogue state, tool‑calling, tiered offers, and confirmations.
    • NLU & Slot Filling — AI: Model
      Intent classification (PrepareRitual, AdjustBudget, Replenish, Checkout, ReplaceItem) and entity extraction (festival, deity, ritual, region, date, budget_cap, preferences).
  • Ritual Planner — AI: Tool‑using Agent
    Maps user context to ritual spec variant; validates mandatory/optional sets; proposes three bundles.
  • Replenishment Forecaster — ML: Model (optional)
    Learns consumable burn rates; outputs horizon‑based SKU/qty suggestions.
  • Personalization & Ranking — ML: Model (optional)
    Ranks substitutes and SKUs using user/profile/context features.
  • Policy/Guardrails — AI: Guardrails
    Enforces safety, purity constraints, and lineage/region appropriateness.
  • MCP Tooling Layer — AI: MCP Server
    Exposes catalog, ritual, bundle, cart, and calendar tools to the orchestrator in a typed, discoverable interface.
  • Embedding Search — AI: Vector DB + Embeddings
    Fuzzy matches user queries to rituals, deities, festivals, and products.
  • TTS/ASR — AI: Service
    Telugu + English speech‑to‑text and text‑to‑speech for multimodal UX.
  • AI and LLM Evaluation Bench — AI: Eval Framework
    Automated and manual evaluation of NLU, planning, personalization, and end‑to‑end flows.

Non‑AI Components

  • Catalog Service — API + DB
    Products, tags, substitutes, pricing, stock, shelf‑life.
  • Ritual Service — API + Rules/KB
    Ritual specifications, regional/sampradāya variants, mandatory/optional items, purity rules.
  • Bundle Service — API
    Deterministic assembly/validation of bundles; budget‑constrained optimization; price totals.
  • Cart/Checkout Service — API
    Cart mutation, taxes, shipping, payments, donation split ledger.
  • Profile Service — API + DB
    Region, language, household size, preferences, purchase history.
  • Inventory/Pricing Adapter — API
    Reconciles live stock and price from ERP/marketplace.
  • Calendar/Events Service — API
    Panchang/festival calendar, reminder scheduling, locale offsets.
  • Provenance & Certification — API + DB
    Supplier metadata, authenticity badges, audit trails.
  • Telemetry/Analytics — Data Pipeline + Warehouse
    Offer acceptance, budget hit‑rate, substitution frequency, refund rate.
  • UI/Clients — Web/App
    Chat surface, bundle review, cart, checkout, order tracking.
  • AuthN/AuthZ & Compliance — Services
    User identity, consent flags, GST/VAT compliance, receipts.

Interfaces (Tools exposed via MCP)

  • tool.getRitualPlan(slots) → {bundles[]}
  • tool.searchProducts(query) → {products[]}
  • tool.priceBundle(bundle_id) → {total, availability}
  • tool.cartAdd(items[]) → {cart_id, total}
  • tool.cartReplace(cart_id, item_id, substitute_id) → {cart}
  • tool.userReplenish(user_id, category, horizon_days) → {suggestions[]}
  • tool.calendarUpcoming(region) → {events[]}

Data Model (minimum viable)

  • Product(id, name, tags[], price, uom, region[], deity[], festival[], substitutes[], in_stock, shelf_life_days, provenance_id)
  • Ritual(id, name, deity, festival?, items_spec[{tag, qty_std, purity, mandatory}], region, sampradāya, version)
  • Bundle(id, ritual_id, items[{product_id, qty}], price_total, region, variant_rank)
  • User(id, locale, region, prefs{brandless, eco, incense_strength, allergies}, household_size)
  • PurchaseHistory(user_id, product_id, qty, dt, recurrence_hint)
  • Provenance(id, supplier, certificate_uri, audited_on)

Execution Flow (happy path)

  1. NLU parses request → slots.
  2. Ritual Planner selects variant → Bundle Service assembles A/B/C.
  3. Catalog/Inventory prices and validates availability.
  4. Orchestrator presents offers with diffs and totals.
  5. User accepts tier → Cart/Checkout processes; optional donation split.
  6. Replenishment Forecaster schedules future suggestions based on usage + calendar.