Skip to content

Functional prototype - #17

Open
Santhosh-p653 wants to merge 85 commits into
interviewstreet:mainfrom
Santhosh-p653:main
Open

Functional prototype#17
Santhosh-p653 wants to merge 85 commits into
interviewstreet:mainfrom
Santhosh-p653:main

Conversation

@Santhosh-p653

Copy link
Copy Markdown

Changes Implemented

Data Processing Layer

Added dataset loading support for:

  • Messages
  • Users
  • Groups
  • Group members
  • Business accounts
  • User business history
  • Message history
  • Message events
  • Images
  • Voice notes
  • Notification summaries
  • Sample messages

Context Building

Implemented MessageContext to enrich messages with:

  • User information
  • Group information
  • Business information
  • Historical interactions
  • Message events
  • Media context
  • Notification behavior
  • Business relationship history

Media handling is integrated directly into the context layer.


Retrieval System

Implemented similarity-based retrieval using rapidfuzz.

The retriever:

  • Searches historical examples
  • Finds similar messages
  • Provides evidence message IDs for explainability

Analyzer Modules

Added specialized analyzers:

  • Safety Analyzer
  • Priority Analyzer
  • Personalization Analyzer
  • Notification Load Analyzer
  • Message Type Analyzer
  • Business Analyzer
  • Group Analyzer
  • Media Analyzer

Each analyzer produces independent signals consumed by the decision engine.


Decision Engine

Implemented weighted scoring-based routing.

Signals considered:

Notify

  • Message priority
  • User personalization
  • Group relevance
  • Business relevance
  • Notification load
  • Media importance
  • Safety penalty

Mute

  • Safety risk
  • Low relevance
  • Low business importance

Digest

  • Notification balancing

The highest scoring action is selected as the final prediction.


Output Generation

Added centralized OutputGenerator.

Generated output:
dataset/output.csv


Testing

Added and validated automated tests.

Verified:

  • Output file generation
  • Required columns
  • Valid actions
  • Prediction generation for all messages

Final status:

✅ All tests passing
✅ Output generated successfully
✅ Submission format validated


Future Improvements

Potential enhancements:

  • Replace fuzzy retrieval with embedding-based semantic search
  • Add LLM-based reasoning agents
  • Introduce feedback-based learning
  • Add real-time message streaming support
  • Improve confidence calibration using ML models

Validation

The implementation successfully generates routing predictions for the complete dataset and produces explainable decisions with confidence scores and supporting evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant