mySite

Co-Insight: A Generative AI-Powered Discourse Analyzer for Meaningful Learning

Author: Ranjidha Rajan
Date: April 2025
Capstone Project – Gen AI Intensive Course 2025Q1
View on Kaggle ↗


The Problem: Scaling Meaningful Learning Analysis

Discussion forums are central to online and blended learning. But as these spaces grow, educators face a major challenge:
How can we analyze hundreds of posts for meaningful learning without manually tagging them all?

Frameworks like the Community of Inquiry (CoI) are excellent for identifying cognitive and social engagement in online learning. However, applying them manually is labor-intensive, inconsistent, and not scalable.

Most automated tools focus on keyword-based tagging or sentiment analysis—missing out on deeper semantic connections and pedagogical intent embedded in student discussions.


The Vision: AI-Augmented Forum Intelligence

Enter Co-Insight – an AI-powered assistant that classifies discussion forum posts using the Community of Inquiry framework.
More than just tagging, it analyzes cognitive presence (like exploration, integration, resolution) and social presence (like emotional expression, group cohesion) in context.

What makes it different? CoInsight integrates Google Gemini’s generative AI capabilities with semantic search and vector-based reasoning, enabling context-aware classification and graph-powered discourse visualization.


How It Works: Behind the Scenes of CoInsight

CoInsight is built using the following pipeline:

1. Data Ingestion & Cleaning

Forum posts are loaded from JSON format and cleaned using BeautifulSoup to remove HTML artifacts.

2. Semantic Embeddings

Using Gemini’s embedding-001 model, each post is transformed into a vector embedding optimized for retrieval tasks.

result = genai.embed_content(
    model="models/embedding-001",
    content=post_text,
    task_type="retrieval_document"
)

3. Contextual Few-Shot Prompting with RAG

Each post is paired with its top 2 semantically similar posts. Gemini is prompted using few-shot examples and related context to generate a structured classification:

{
  "cognitive_presence": "exploration",
  "social_presence": "open_communication"
}

4. Graph Construction

Forum posts are connected to their CoI categories (as labeled nodes) and to each other based on semantic similarity (> 0.88 cosine threshold).

This graph highlights:


🔭 Gemini Features Used

CoInsight harnesses the full power of Google Gemini, including:

These enable pedagogically accurate, context-rich classification of learner discourse.


📊 Visualizing Engagement as a Graph

The output graph provides a bird’s-eye view of forum dynamics:

Forum Graph Visualization
Actual graph generated with NetworkX and Matplotlib


Why This Matters

CoInsight isn’t just a classifier—it’s a learning analytics lens that empowers instructors to:

It bridges the gap between pedagogical theory and AI in practice, showing how LLMs can foster reflective, data-informed teaching.


Future Directions

This is just the beginning. Potential extensions include:


🧾 Credits

Project: Co-Insight – AI-Powered Discourse Analyzer
Author: Ranjidha Rajan
Affiliation: Gen AI Intensive Course Capstone 2025Q1
GitHub/Kaggle Profile: @ranjidharajan


“AI should not replace educators, but help them hear the voices in the crowd.”