TurionAI: Academic Search Finally Simplified

By Sujal28 days ago
213
TurionAI: Academic Search Finally Simplified

TurionAI is a powerful multi-agent system designed to help students with all types of academic queries. Whether it's solving a math problem, understanding a coding concept, or fetching the latest updates about college life everything is handled intelligently and efficiently.

We have completed all testing and are fully prepared for launch currently just waiting for the right moment.

Let me say this up front: TurionAI is the most challenging and ambitious product I have ever built.

This post will tell you…

HOW TURIONAI WORKS

1. QUERY PLANNING WITH SUPERVISOR AGENT

When a user enters a query, it is handled by the Supervisor Agent, which has planning capabilities. This agent analyzes the query and creates an optimal plan to fulfill it. The plan may involve triggering multiple specialized agents, either in series, parallel, or a combination of both.

It also modifies the main query into targeted sub-queries and delegates them to the appropriate agents.

AGENTS IN THE MULTI-AGENT SYSTEM

Each agent is built for a specific category of queries. Here's a breakdown of how they work.

RAGAGENT

This is the most complex and central agent in the system.

INTERNAL ROUTING LOGIC

The RAGAgent first determines whether the query can be handled by:

• A filter-based direct search, or • A semantic search for deeper, context-driven results.

FILTER-BASED PATH

If direct search is selected:

• A structured database query is generated. • Documents are retrieved. • Data is transformed into structured, human-readable format. • The final response is streamed to the frontend.

SEMANTIC SEARCH PATH

If semantic search is chosen:

  1. The query is refined and improved for better retrieval.
  2. A dynamic k-value is calculated based on query depth (this determines how many documents to retrieve).
  3. A Document Relevancy Checker runs in parallel to remove unrelated documents.
  4. The filtered and most relevant context is passed to an Answer Generator Agent, which produces the final response.

DOCUMENT INGESTION AND PROCESSING

To build the RAG knowledge base:

• We gathered high-quality content: handwritten notes, teacher slides, PPTs, PYQs, and syllabus documents. • These were processed using OCR (powered by MistralAI) and stored in Azure Blob Storage.

CHUNKING STRATEGY

Different chunking strategies were applied based on document type:

Course content: Semantic chunking — breaking documents into sentences and recombining them based on meaning. • PYQs: Unit-wise chunking — each paper is divided unit by unit. • Syllabus: Stored as large individual chunks.

All resulting chunks were embedded and stored in Qdrant, our vector database.

RedditAgent

This agent handles college-related queries using Reddit.

• The query is broken into sub-queries. • Multiple Reddit searches are performed (mainly within college-specific subreddits). • Relevant context is gathered. • The agent then constructs an answer based on real-world student discussions and solutions.

WebAgent

Similar to RedditAgent, the WebAgent is responsible for fetching up-to-date information from the internet.

• It splits the user query into meaningful sub-queries. • Searches are run across reliable online sources. • The content is filtered and compiled to answer the query.

CodeAgent

Designed to help students with coding and tech-related queries, including:

• Solving DSA problems • Providing technology roadmaps • Answering code and programming doubts

The agent uses a high-reasoning LLM with a thoroughly researched prompt tailored for code-related reasoning. In our experience, it performs exceptionally well for DSA-focused problems.

MathAgent

This agent specializes in mathematics-related queries.

• It solves problems, explains steps, and helps understand concepts. • Equipped with a reasoning LLM and the ability to execute Python code for precise calculations. • It uses a refined prompt to ensure accuracy, clarity, and correctness.

AttendanceAgent

This agent integrates with Hajiri, our earlier product, to:

• Fetch the user's attendance data by scraping the college portal. • Display it seamlessly within TurionAI.

DIRECT AGENT ACCESS IN THE FRONTEND

In addition to the Supervisor-controlled flow, the frontend also offers manual tool access. Users can directly select a specific agent to solve their query, skipping the planning phase entirely.

FRONTEND EXPERIENCE

The frontend is intentionally designed to resemble popular LLM-based interfaces, ensuring familiarity and ease of use.

Features include:

• Chat session management (create, delete, archive) • Theme switching (light/dark) • Real-time answer streaming via SSE • Responsive and intuitive layout

TECH STACK

Frontend: Next.js, Various NPM libraries

Backend: Node.js, Various NPM libraries

API: Express.js (with JWT authentication, rate limiting, and SSE support)

AI Frameworks and Models: LangChainJS, LangGraph, LLMs from Google Gemini, OpenAI, MistralAI, and TogetherAI (open-source)

OCR: MistralAI's latest OCR model

Storage: Azure Blob Storage

Database: MongoDB

Vector Database: Qdrant

Future Plans

• Document upload and text input support will be added soon. • Expanding the range and capabilities of each agent. • More integrations and personalized academic tools for students.

Special thanks to Manish for improving all prompts and uploading the foundational content.

TurionAI is more than just an assistant it's an academic companion designed for students who want clarity, speed, and intelligent support.

Comments