Context Engineering Powers Lectio to Deliver Smart Tutoring
August 7, 2025
Learn how context engineering enables Lectio to provide accurate, contextual answers from your course materials.
Introduction
In both education and artificial intelligence, context is king. In the case of AI specifically, context has a technical meaning - it is the conversational history and large language model (LLM) training that leads up to a student's query. An instructor — or an AI — can only answer a student's question as well as the context they have to work with.. In a normal chatbot, a student's query is processed by the AI model, which generates a response based on its pre-trained knowledge. Because the pre-training data is so vast, the AI will often generate a response that is accurate, but not specific to the student's course. The AI might provide an answer that is too advanced for the student's level (or vice versa), or it might focus on details that are irrelevant to the student's learning objectives. In the worst case, the AI might even provide an answer that is completely incorrect (sometimes called hallucination). For these and other reasons, generic AI chatbots are often not well suited for educational purposes.
The secret behind Lectio is careful context engineering. Unlike generic AI chatbots that rely on pre-trained knowledge alone, Lectio can “read” the specific lectures, notes, and textbooks related to the course; perceive the true intentions behind the student's query; comprehend its own purpose as a tutor; and understand the overarching objectives of the class or module. With this optimized context, Lectio then provides answers that are not only accurate but also tailored to the student's learning objectives.
Pre-training: Most AI models are trained on vast datasets, but they lack the specific context of your course. Pre-training is the initial phase where the model learns general language patterns and knowledge. The training data is, essentially, all the knowledge of the history of the world. Pretty impressive, but it's not always very useful for answering questions about your specific course materials.
Engineering the context behind a student's query
When a student uses a publicly available AI chatbot, they are relying on the AI's pre-trained knowledge to answer their question. In this case, the AI will use it's general knowledge (which is significant) to provide an answer, and in state-of-the-art models, the answer is likely to be very good.
For example:
However, while in this case the AI's answer is not technically inaccurate, it is not specific to the student's course, and if the student were to give this answer on an assessment, they wouldn't receive full marks.
When a student uses Lectio, however, the AI is able to use an engineered context including the course materials, the instructor's learning objectives, and Lectio's optimized system prompt to provide an answer that is specific to the course. Furthermore, Lectio will also cite its answers, providing clickable links that will open up the answer's sources.
When one compares the answers from Lectio and the generic AI, one can see that the generic AI answer has nearly all of the correct elements (two of three correct stages, involvement of eggs and cercariae, Katayama syndrome, etc.). However, there are key missing details (immunopathology), and one stage (the acute stage) has been split into two. The answer is nearly correct but incomplete. If using the generic AI tool to study, the student would very likely believe that they were achieving this learning objective, but they would be disappointed once the assessment came.
Contextual sources
Above, we showed how careful engineering of the context behind a query results in more accurate and relevant answers. But how does Lectio actually do this? The answer comes in three parts:
- Semantic search of course materials
- An optimized system prompt
- Injection specific learning objectives
Let's take these in order:
Semantic search of course materials
Semantic search is a technique that allows Lectio to find relevant information from your course materials, even if the exact words don't match the student's query. This is done by embedding the course materials into special type of database, which allows for efficient and accurate retrieval of relevant content. When a student asks a question, Lectio performs a semantic search to find the most relevant sections of the course materials, and top hits are returned as context for the AI. This ensures that the AI's response is grounded in the specific content of the course, rather than relying solely on its pre-trained knowledge.
Optimized system prompt
The system prompt is the initial instruction given to the AI model. System prompts are what control the style and personality of the AI's responses. Lectio uses three optimized system prompts from which students can select, and each will behave slightly differently. Further, the system prompt also tells the AI at what level to provide its answer, which means answers will be tailored for a graduate or undergraduate audience.
Injection of specific learning objectives
Finally, Lectio injects the specific learning objectives of the course into the context behind the student's query. This means that the AI is not only aware of the course materials, but also the goals of the course and/or selected modules. In backward course design, this is called alignment. By aligning the AI's responses with the learning objectives, Lectio ensures that the answers are not only accurate but also relevant to what the student is expected to learn. In this way, Lectio is better suited than generic AI chatbots for preparing students for assessments.
Looking ahead: retrieval-augmented generation (RAG)
Context engineering gives Lectio the raw power to generate tailored answers, and it performs best when it's aligned with course and module objectives. In this way, Lectio encourages and empowers use of evidence-based pedagogies. In our next two posts, we’ll explore retrieval-augmented generation (RAG) and backward course design, the two primary methods for giving Lectio the right context for its answers.