
Shaastris - Riverline's AI Business-Analysts
Shaastris - Riverline's AI Business-Analysts
Shaastris - Riverline's AI Business-Analysts
Feb 3, 2026
Ankit Sanghvi








What Problem Are We Solving?
Riverline is a debt collection company. Our clients are fintech apps who give us lists of borrowers who haven't paid their loans.
Our job: Contact these borrowers, understand their situation, and help them pay.
The data challenge:
Every month, each fintech sends us a spreadsheet with borrower details:
Phone numbers
Loan amounts
How many days they're overdue (called "DPD" — Days Past Due)
Their location, loan type, and other attributes
This spreadsheet is called a CSV file (Comma-Separated Values) — it's just a table of data that Excel can open.
Meanwhile, our collection platform tracks every interaction:
Did we call them? Did they pick up?
Did we send a WhatsApp? Did they read it?
Did they promise to pay (called a "PTP" — Promise To Pay)?
Did they actually pay?
This interaction data lives in a database (MongoDB) — think of it as a giant organized storage system that can answer questions like "show me everyone who read our WhatsApp but didn't pay."
The problem: The CSV and the database don't talk to each other automatically. To understand "which types of borrowers actually pay?", someone has to manually:
Match phone numbers between the CSV and database
Calculate engagement rates for each segment
Figure out patterns
Remember those patterns for next time
This takes hours. And the insights get lost in spreadsheets that nobody can find later.
The Solution: AI Analysts Who Remember Everything
We built Shaastris — a system of AI analysts that:
Connects the dots — Automatically links CSV attributes to database outcomes
Learns patterns — Discovers which segments perform well or poorly
Remembers forever — Stores insights in files that persist across sessions
Shares knowledge — Syncs learnings across the team via GitHub
Speaks plain English — No coding required to ask questions
The name "Shaastri" comes from Hindi, meaning "minister" or "learned advisor" — like the wise counselors who advised ancient kings.
How Data Flows Through the System
Step 1: The Client Sends a CSV
Every month, a fintech client (let's call them "Fintech A") sends us a spreadsheet:
This tells us WHO to contact and their attributes (loan size, how overdue, location, etc.)
Step 2: Our Platform Tracks Engagement
As our team works these cases, the platform records every interaction in the database:
Call records:
WhatsApp records:
Payment records:
Step 3: Shaastris Connects the Dots
When you ask "What's working for Fintech A?", the system:
Reads the CSV — Gets all the borrower attributes (DPD, state, lender, etc.)
Queries the database — Pulls engagement and payment data for each borrower
Matches by phone number — Links CSV rows to database records
Calculates patterns — Groups by attribute and measures success rates
Example output:
Step 4: The System Remembers
This insight gets saved to a file called learnings.md:
Next month, when Fintech A sends a new CSV, Shaastris already knows to recommend fresher accounts.
The Security Layer: How PII Stays Protected
PII (Personally Identifiable Information) means sensitive data like names, phone numbers, and addresses.
The challenge: We need AI to analyze patterns, but we don't want AI to see or store actual borrower details.
The solution: Our database connection uses a special protocol called MCP (Model Context Protocol) that masks PII at the fetch layer:
The connection string itself is configured to redact sensitive fields
AI receives anonymized data:
Customer ID: 695e8de2...instead of actual namesPhone numbers are hashed — useful for matching, but not readable
Only engagement patterns, dispositions, and aggregated metrics flow through
What the AI sees:
Customer: [HASH_a1b2c3]
What the AI never sees:
This means we can run deep analytics ("which states have the best payment rates?") without exposing individual borrower information.
Who Uses This at Riverline (And How)
Operations Managers
Morning routine:
Gets: All-portfolio summary — who's performing, who's struggling, what needs attention.
Account Managers
Before client meetings:
Gets: Engagement funnel, green zones (what to ask for), red zones (what to avoid), talking points.
Team Leads
Finding high-potential cases:
Gets: List of borrowers who picked up calls or read WhatsApp but haven't paid yet — with recommended follow-up actions.
Leadership
Forecasting:
Gets: Expected Rate of Return based on historical patterns for similar segments.
No one needs to write code, SQL queries, or understand databases. Just ask in plain English.
The Team of AI Specialists
Each fintech client has its own "Shaastri" — a specialist AI that knows that portfolio's quirks:
Shaastri | Client | What It Has Learned |
|---|---|---|
Shaastri-A | Fintech A | Bank X lender performs 1.3x better than Bank Y. "Segment 1" beats "Segment 2". EMI payment history predicts success. |
Shaastri-B | Fintech B | Partner P has 18% dropoff vs Partner Q at 2%. Lender L-sourced loans outperform. High wrong-number rate. |
Shaastri-C | Fintech C | Counterintuitive: "Low Risk" borrowers drop off MORE than "High Risk". Partner R is best performer. |
Shaastri-D | Fintech D | East zone underperforms West. Education loans have longer resolution cycles. |
Shaastri-E | Fintech E | 50% of meaningful conversations are grievances (disputes). DPD 181-364 outperforms 365+. |
Birbal | All | Cross-portfolio patterns. Runs daily briefings. Orchestrates all other Shaastris. |
Each Shaastri maintains its own memory file where learnings accumulate over time.
How Self-Learning Works
The Learning Loop
Every analysis follows this cycle:
Real Example: The Risk Flag Paradox
Initial assumption: Avoid borrowers flagged as "High Risk" — they're less likely to pay.
What the data showed:
Wait — the "safe" borrowers performed WORSE?
Learning captured:
This insight now applies to every future analysis for that client automatically. A human analyst might have taken months to notice this pattern — or never noticed it at all.
What "Multipliers" Mean
When Shaastris says "DPD 181-270 has a 1.5x multiplier," here's what that means:
Baseline: If 10% of all borrowers pay on average... 1.5x multiplier: Borrowers in the 181-270 DPD bucket pay at 15% (10% × 1.5) 0.5x multiplier: Borrowers in the 540+ DPD bucket pay at 5% (10% × 0.5)
Green zones = Segments with multipliers above 1.0 (ask for more of these) Red zones = Segments with multipliers below 1.0 (avoid or negotiate lower)
These multipliers are calculated from real data and updated as new patterns emerge.
What You Actually Get
1. Retention CSV
A spreadsheet of borrowers with recommended actions:
Each borrower gets a machine-determined state and specific next step.
2. Allocation Guide (Word Document)
A professional report for client negotiations:
Green Zones — Which segments to ask for more of, with data backing
Red Zones — Which segments to avoid, with reasons
RoR Prediction — Expected Rate of Return for the recommended mix
Capacity Analysis — How many cases your team can realistically handle
Riverline Commitments — What operational improvements you'll make
3. Slack Updates
Daily 7 AM brief — All-portfolio summary posted automatically
On-demand sharing — "Share this on Slack" posts analysis to team channel
The Automation Layer
Daily Brief (7 AM)
Every morning, the system:
Wakes up via scheduled task (cron job)
Pulls latest learnings from GitHub
Queries all active portfolios
Calculates key metrics (engagement rates, PTP stock, dead zones)
Posts summary to Slack
Example output:
Auto-Sync (7 PM)
Every evening:
Commits any new learnings discovered during the day
Pushes to GitHub
Tomorrow, everyone starts with the latest knowledge
How It's Organized (Directory Structure)
Key Concepts Glossary
Term | What It Means |
|---|---|
CSV | Comma-Separated Values — a spreadsheet file format |
MongoDB | A database that stores our engagement and payment data |
MCP | Model Context Protocol — secure way for AI to query databases |
PII | Personally Identifiable Information (names, phones, addresses) |
DPD | Days Past Due — how overdue a loan is |
PTP | Promise To Pay — borrower committed to a payment date |
RTP | Refusal To Pay — borrower declined to pay |
RoR | Rate of Return — percentage of outstanding amount collected |
Multiplier | Performance factor vs baseline (1.5x = 50% better than average) |
Green Zone | High-performing segment (multiplier > 1.0) |
Red Zone | Low-performing segment (multiplier < 1.0) |
Engagement | Any interaction — call connected, WhatsApp read, email opened |
Disposition | Outcome of a conversation — PTP, RTP, callback, dispute, etc. |
Why This Approach Works
Before Shaastris
Insights lived in personal Excel files
Knowledge left when analysts left
Every portfolio review started from scratch
Patterns discovered and forgotten
Inconsistent analysis across clients
After Shaastris
Single source of truth in version-controlled repository
Every insight persists in learnings files
New team members inherit all previous knowledge
Patterns compound over time
Best analyst's insights available to everyone
How to Implement Something Similar
If you're building a similar system for your domain:
1. Identify Your Two Data Sources
Static attributes (CSV): Customer characteristics that don't change
Dynamic outcomes (Database): What happened when you engaged them
2. Build a Linking Layer
Match records between sources (usually by phone, email, or ID)
Normalize formats (phone numbers especially vary wildly)
3. Calculate Segment Performance
Group by each attribute
Measure success rate per group
Express as multipliers vs baseline
4. Store Learnings as Files
Markdown files work great (human-readable, version-controllable)
Structure: Observation → Data → Action → Confidence
5. Version Control Everything
Use Git so learnings sync across the team
Pull before analysis, push after insights
6. Add Natural Language Interface
Claude or similar AI can translate plain English to database queries
MCP protocol handles secure database connections
7. Automate the Routine
Daily summaries via cron jobs
Auto-sync learnings every evening
Quick Start
cd
Then just talk:
The Shaastris handle the rest.
Built for Riverline operations teams. Designed for non-engineers. Knowledge that compounds.
What Problem Are We Solving?
Riverline is a debt collection company. Our clients are fintech apps who give us lists of borrowers who haven't paid their loans.
Our job: Contact these borrowers, understand their situation, and help them pay.
The data challenge:
Every month, each fintech sends us a spreadsheet with borrower details:
Phone numbers
Loan amounts
How many days they're overdue (called "DPD" — Days Past Due)
Their location, loan type, and other attributes
This spreadsheet is called a CSV file (Comma-Separated Values) — it's just a table of data that Excel can open.
Meanwhile, our collection platform tracks every interaction:
Did we call them? Did they pick up?
Did we send a WhatsApp? Did they read it?
Did they promise to pay (called a "PTP" — Promise To Pay)?
Did they actually pay?
This interaction data lives in a database (MongoDB) — think of it as a giant organized storage system that can answer questions like "show me everyone who read our WhatsApp but didn't pay."
The problem: The CSV and the database don't talk to each other automatically. To understand "which types of borrowers actually pay?", someone has to manually:
Match phone numbers between the CSV and database
Calculate engagement rates for each segment
Figure out patterns
Remember those patterns for next time
This takes hours. And the insights get lost in spreadsheets that nobody can find later.
The Solution: AI Analysts Who Remember Everything
We built Shaastris — a system of AI analysts that:
Connects the dots — Automatically links CSV attributes to database outcomes
Learns patterns — Discovers which segments perform well or poorly
Remembers forever — Stores insights in files that persist across sessions
Shares knowledge — Syncs learnings across the team via GitHub
Speaks plain English — No coding required to ask questions
The name "Shaastri" comes from Hindi, meaning "minister" or "learned advisor" — like the wise counselors who advised ancient kings.
How Data Flows Through the System
Step 1: The Client Sends a CSV
Every month, a fintech client (let's call them "Fintech A") sends us a spreadsheet:
This tells us WHO to contact and their attributes (loan size, how overdue, location, etc.)
Step 2: Our Platform Tracks Engagement
As our team works these cases, the platform records every interaction in the database:
Call records:
WhatsApp records:
Payment records:
Step 3: Shaastris Connects the Dots
When you ask "What's working for Fintech A?", the system:
Reads the CSV — Gets all the borrower attributes (DPD, state, lender, etc.)
Queries the database — Pulls engagement and payment data for each borrower
Matches by phone number — Links CSV rows to database records
Calculates patterns — Groups by attribute and measures success rates
Example output:
Step 4: The System Remembers
This insight gets saved to a file called learnings.md:
Next month, when Fintech A sends a new CSV, Shaastris already knows to recommend fresher accounts.
The Security Layer: How PII Stays Protected
PII (Personally Identifiable Information) means sensitive data like names, phone numbers, and addresses.
The challenge: We need AI to analyze patterns, but we don't want AI to see or store actual borrower details.
The solution: Our database connection uses a special protocol called MCP (Model Context Protocol) that masks PII at the fetch layer:
The connection string itself is configured to redact sensitive fields
AI receives anonymized data:
Customer ID: 695e8de2...instead of actual namesPhone numbers are hashed — useful for matching, but not readable
Only engagement patterns, dispositions, and aggregated metrics flow through
What the AI sees:
Customer: [HASH_a1b2c3]
What the AI never sees:
This means we can run deep analytics ("which states have the best payment rates?") without exposing individual borrower information.
Who Uses This at Riverline (And How)
Operations Managers
Morning routine:
Gets: All-portfolio summary — who's performing, who's struggling, what needs attention.
Account Managers
Before client meetings:
Gets: Engagement funnel, green zones (what to ask for), red zones (what to avoid), talking points.
Team Leads
Finding high-potential cases:
Gets: List of borrowers who picked up calls or read WhatsApp but haven't paid yet — with recommended follow-up actions.
Leadership
Forecasting:
Gets: Expected Rate of Return based on historical patterns for similar segments.
No one needs to write code, SQL queries, or understand databases. Just ask in plain English.
The Team of AI Specialists
Each fintech client has its own "Shaastri" — a specialist AI that knows that portfolio's quirks:
Shaastri | Client | What It Has Learned |
|---|---|---|
Shaastri-A | Fintech A | Bank X lender performs 1.3x better than Bank Y. "Segment 1" beats "Segment 2". EMI payment history predicts success. |
Shaastri-B | Fintech B | Partner P has 18% dropoff vs Partner Q at 2%. Lender L-sourced loans outperform. High wrong-number rate. |
Shaastri-C | Fintech C | Counterintuitive: "Low Risk" borrowers drop off MORE than "High Risk". Partner R is best performer. |
Shaastri-D | Fintech D | East zone underperforms West. Education loans have longer resolution cycles. |
Shaastri-E | Fintech E | 50% of meaningful conversations are grievances (disputes). DPD 181-364 outperforms 365+. |
Birbal | All | Cross-portfolio patterns. Runs daily briefings. Orchestrates all other Shaastris. |
Each Shaastri maintains its own memory file where learnings accumulate over time.
How Self-Learning Works
The Learning Loop
Every analysis follows this cycle:
Real Example: The Risk Flag Paradox
Initial assumption: Avoid borrowers flagged as "High Risk" — they're less likely to pay.
What the data showed:
Wait — the "safe" borrowers performed WORSE?
Learning captured:
This insight now applies to every future analysis for that client automatically. A human analyst might have taken months to notice this pattern — or never noticed it at all.
What "Multipliers" Mean
When Shaastris says "DPD 181-270 has a 1.5x multiplier," here's what that means:
Baseline: If 10% of all borrowers pay on average... 1.5x multiplier: Borrowers in the 181-270 DPD bucket pay at 15% (10% × 1.5) 0.5x multiplier: Borrowers in the 540+ DPD bucket pay at 5% (10% × 0.5)
Green zones = Segments with multipliers above 1.0 (ask for more of these) Red zones = Segments with multipliers below 1.0 (avoid or negotiate lower)
These multipliers are calculated from real data and updated as new patterns emerge.
What You Actually Get
1. Retention CSV
A spreadsheet of borrowers with recommended actions:
Each borrower gets a machine-determined state and specific next step.
2. Allocation Guide (Word Document)
A professional report for client negotiations:
Green Zones — Which segments to ask for more of, with data backing
Red Zones — Which segments to avoid, with reasons
RoR Prediction — Expected Rate of Return for the recommended mix
Capacity Analysis — How many cases your team can realistically handle
Riverline Commitments — What operational improvements you'll make
3. Slack Updates
Daily 7 AM brief — All-portfolio summary posted automatically
On-demand sharing — "Share this on Slack" posts analysis to team channel
The Automation Layer
Daily Brief (7 AM)
Every morning, the system:
Wakes up via scheduled task (cron job)
Pulls latest learnings from GitHub
Queries all active portfolios
Calculates key metrics (engagement rates, PTP stock, dead zones)
Posts summary to Slack
Example output:
Auto-Sync (7 PM)
Every evening:
Commits any new learnings discovered during the day
Pushes to GitHub
Tomorrow, everyone starts with the latest knowledge
How It's Organized (Directory Structure)
Key Concepts Glossary
Term | What It Means |
|---|---|
CSV | Comma-Separated Values — a spreadsheet file format |
MongoDB | A database that stores our engagement and payment data |
MCP | Model Context Protocol — secure way for AI to query databases |
PII | Personally Identifiable Information (names, phones, addresses) |
DPD | Days Past Due — how overdue a loan is |
PTP | Promise To Pay — borrower committed to a payment date |
RTP | Refusal To Pay — borrower declined to pay |
RoR | Rate of Return — percentage of outstanding amount collected |
Multiplier | Performance factor vs baseline (1.5x = 50% better than average) |
Green Zone | High-performing segment (multiplier > 1.0) |
Red Zone | Low-performing segment (multiplier < 1.0) |
Engagement | Any interaction — call connected, WhatsApp read, email opened |
Disposition | Outcome of a conversation — PTP, RTP, callback, dispute, etc. |
Why This Approach Works
Before Shaastris
Insights lived in personal Excel files
Knowledge left when analysts left
Every portfolio review started from scratch
Patterns discovered and forgotten
Inconsistent analysis across clients
After Shaastris
Single source of truth in version-controlled repository
Every insight persists in learnings files
New team members inherit all previous knowledge
Patterns compound over time
Best analyst's insights available to everyone
How to Implement Something Similar
If you're building a similar system for your domain:
1. Identify Your Two Data Sources
Static attributes (CSV): Customer characteristics that don't change
Dynamic outcomes (Database): What happened when you engaged them
2. Build a Linking Layer
Match records between sources (usually by phone, email, or ID)
Normalize formats (phone numbers especially vary wildly)
3. Calculate Segment Performance
Group by each attribute
Measure success rate per group
Express as multipliers vs baseline
4. Store Learnings as Files
Markdown files work great (human-readable, version-controllable)
Structure: Observation → Data → Action → Confidence
5. Version Control Everything
Use Git so learnings sync across the team
Pull before analysis, push after insights
6. Add Natural Language Interface
Claude or similar AI can translate plain English to database queries
MCP protocol handles secure database connections
7. Automate the Routine
Daily summaries via cron jobs
Auto-sync learnings every evening
Quick Start
cd
Then just talk:
The Shaastris handle the rest.
Built for Riverline operations teams. Designed for non-engineers. Knowledge that compounds.
