Case study · AI assistant

Ansary AI knows the portal

An assistant built into a management portal. Ask in Bangla, English or Banglish — it picks the right report, reads the live figures and answers in plain words.

Tool callingGemini → Groq fallbackVoice & file attachRole-based accessFlask · PostgreSQL
Ansary AI
Ask anything, or attach a file…
Scripted replay of real answers from the demo build · figures are fictional
RoleDesign & full-stack build
Built byShoaib Ansary
StatusLive, in daily use
18live report tools the AI can call
3languages in one chat — it mirrors yours
2AI providers, automatic fallback
0invented figures — numbers come from the tools
01 · Language

Ask the way you talk

People type in Bangla script, English, or Banglish — sometimes all three in one chat. Ansary AI answers in the same style you asked in, so nobody has to switch to "software English".

  • Replies mirror the user's language and tone
  • Follow-up questions keep the context ("and in September?")
  • Tables and lists come back clean, ready to read
Banglish and Bangla conversation
English comparison
02 · Real data

Answers from the real reports

The model never guesses a number. It decides which report to open, the portal runs its own report code, and the assistant reads the result back — shipped value, share, change between quarters.

  • Quarter-on-quarter comparisons in one question
  • Top buyers, new orders, closing balance, KPI scores
  • Numbers match what the page itself shows
03 · How it works

From a question to a grounded answer

Every reply goes through the same short loop — and the loop is bounded, so a confused model can't spin forever.

1

You ask

Text, voice or an attached file

2

Model plans

Picks a tool, or answers directly

3

Tool runs

Portal's own report code, with your permissions

4

Model reads

Up to six rounds if it needs more data

5

Plain answer

In your language, with a Listen button

get_closing_balanceget_commission_billget_commission_summaryget_export_register_reportget_group_kpi_totalsget_increment · restrictedget_kpi_leaderboardget_kpi_scoreget_meetingsget_new_ordersget_pending_approvalsget_performance_evaluationget_quality_summaryget_shipment_by_invoiceget_shipment_totalsget_team_b_reportget_team_comparisonget_weather

The 18 tools. Gold = sensitive, enforced by role.

04 · Voice & files

Talk to it. Hand it a file.

Dictate a question with the microphone and have the answer read aloud with Listen. Attach a picture, PDF, Excel or Word file and ask about it — all inside the same chat.

  • Voice input and spoken replies
  • Images, PDF, Excel and Word attachments (5 MB)
  • "New chat" clears the conversation in one tap
Phone chat
AI provider settings
05 · Reliability & safety

Built to keep working

If one AI provider is busy or out of quota, the chat quietly continues on the other. The page lets an administrator update provider keys without touching the server.

  • Gemini first, Groq as automatic fallback
  • Model names auto-discovered, so a retired model doesn't break chat
  • Management-only access; sensitive tools check the user's role
06 · Under the hood

Small stack, careful rules

Tool calling

Eighteen declared functions with typed arguments. The model asks; the portal executes and returns data only.

System prompt

Mirrors the user's language, states what it can't do, and is told never to invent a figure it didn't get from a tool.

Permissions

Checks live inside each tool, so a clever prompt can't reach data the signed-in user couldn't open themselves.