enablinglearning.com
Use arrow keys or click buttons to navigate
How We Build AI Tutors
That Actually Know Things
RAG Architecture, Embeddings, Guardrails, and the Vygotskian Design Behind It
Luis Hernandez & Dr. Uvaldina Janecek
Texas State University AI & Teaching/Learning Symposium
March 5, 2026
The Problem with Generic AI
Why ChatGPT alone is not enough for education

Hallucination

General AI confidently invents facts. Ask it about your specific course, policies, or exam requirements and it will guess, sometimes dangerously wrong.

No Domain Expertise

It knows a little about everything, but nothing deep about bilingual education, BTLPT competencies, or your institution's specific content.

No Guardrails

Without safety layers, it can go off-topic, give inappropriate responses, or be manipulated into ignoring its instructions.

No Pedagogical Design

It answers questions. It does not scaffold learning, assess performance, or adapt to the learner's level, the things a good mentor does.

The Solution: RAG (Retrieval-Augmented Generation)

Give the AI access to your own curated knowledge base. It retrieves relevant, verified information before generating a response. The AI still uses its language ability, but the facts come from your data, not its imagination.

What makes RAG truly powerful is how it finds the right knowledge. Instead of keyword matching, the system uses embeddings, a technique that converts text into numerical representations of meaning, so the AI can find relevant content even when the learner's question uses completely different words than the knowledge base.

What Are Embeddings?
Turning text into numbers so computers can find meaning

Human Text

"How do I scaffold vocabulary for emergent bilinguals?"
→

Embedding Model

Converts meaning
into a vector
→

Vector (Numbers)

[0.023, -0.851, 0.442,
0.117, -0.394, ... ]

1,536 dimensions
Why does this matter? Embeddings capture meaning, not just keywords. The question "How do I scaffold vocabulary?" and the knowledge entry "Strategies for academic word development in bilingual classrooms" have similar vectors even though they share almost no words. This is how the AI finds relevant knowledge, by meaning similarity, not keyword matching.

User Question Vector

[0.023, -0.851, ...]
≈

Knowledge Entry Vector

[0.019, -0.847, ...]
→

Match!

Cosine similarity: 0.94
Retrieved as context
The RAG Pipeline
What happens when a student asks a question
Step 1
Student Asks
"How do I teach science vocabulary to ELLs?"
→
Step 2
Safety Screening
Regex + Moderation API filter
→
Step 3
Embed Question
Convert to vector (1,536 dims)
↓
Step 4
Vector Search (Filtered)
Search knowledge base by meaning similarity
+ filter by page context & content type
+
Step 4b
Student Performance
With consent, retrieve scores, patterns,
and progress from course activities
↓
Step 5
LLM + System Prompt
Retrieved knowledge + student context + Vygotskian instructions
"Scaffold, don't give answers. Stay in ZPD. Personalize based on performance."
↓
Step 6
Personalized, Grounded Response
Based on verified knowledge, adapted to the learner's actual performance, within their ZPD
Four Layers of Safety
How we prevent hallucination, abuse, and off-topic responses
1

Regex Pattern Filtering

Catches obvious abuse patterns, prompt injection attempts, and inappropriate content before the request even reaches the AI model. Fast, lightweight, first line of defense.

2

Moderation API

OpenAI's moderation endpoint screens every message for harmful, violent, sexual, or policy-violating content. A second independent filter that catches what regex misses.

3

System Prompt + Custom Code Restrictions

Two layers work together: the AI's system prompt enforces behavioral rules (stay on topic, never invent information, say "I don't know" when uncertain, scaffold instead of giving direct answers). On top of that, custom code restricts what topics the conversation can cover, limiting the AI to the specific educational domain it was designed for, regardless of what the user asks.

4

Context-Aware Retrieval Filtering

The vector search is filtered by where the user is on the platform. A homepage visitor cannot access textbook content. A student in a lesson only gets pedagogically relevant material. This protects both accuracy and intellectual property.

The Knowledge Base
Expert-curated, not scraped. Verified, not generated.
850+
curated knowledge entries
15
content types
$2-10
monthly operating cost
Products & Services FAQ Books & Research SPED Frameworks Glossaries Certification Competencies Pricing Classroom Scenarios Instructional Strategies ELPS Standards

Each Course Gets Its Own Knowledge Filter

Homepage → Company info, products, pricing, FAQ, blog
BTLPT (Spanish) → Spanish grammar, academic vocabulary, language proficiency strategies
Bilingual Ed. → ELPS standards, bilingual pedagogy, certification competencies
ESL Supplemental → ESL methods, sheltered instruction + shared bilingual ed. theory
SPED EC-12 → TExES 186 frameworks, 120 SPED terms, IEP, accommodations
TOEFL / Acad. English → Academic English content, exam strategies, test preparation

Some knowledge is shared across related courses (e.g., bilingual ed. theory applies to both bilingual and ESL contexts), while course-specific content stays isolated.

IP Protection: Expert-created content (book chapters, research papers, articles, and proprietary materials from our specialists) is only retrievable inside the course environment. A casual visitor cannot access it, even if they ask directly.

The Vygotskian Design
How RAG enables AI tutors to function as mentors in the ZPD
Beyond Current Reach
Zone of Proximal Development
(where the AI tutor operates)
What learner
can do alone

RAG Enables Vygotskian AI

Expert Knowledge (MKO)
is implemented as
Curated Vector Database
Scaffolding
is implemented as
System Prompt Design (ADG model)
ZPD Assessment
is implemented as
Dual-Axis Evaluation (pedagogy + language)
Gradual Release
is implemented as
Adaptive Feedback (not answers, guidance)
Individualized Instruction
is implemented as
Performance-Aware Context (with student consent)
Want to Build Something Like This?
We design and build AI-powered learning systems grounded in research, pedagogy, and real classroom experience. If your institution or organization is exploring how AI can support teaching, learning, or professional development, we would love to talk.

For Universities & Programs

Custom AI tutors for teacher preparation, certification practice, or academic language development, built on your content and aligned to your standards.

For Organizations & Districts

AI-powered professional development tools, scenario-based training systems, and knowledge-grounded chatbots designed for your specific domain.

For Researchers & Collaborators

If you are exploring AI in education and want to collaborate on research, pilot programs, or co-authored work, we are always open to meaningful partnerships.

Get in Touch
1 / 8