Learning Companion
The modern learning stack
Course model
The Learning Companion uses a flexible model with feature flags. It supports- A timeline-based view on course slots with concrete dates, and allows for associating directly with the slot (like recordings or boards), or indirectly via course sections.
- A topic-based view on all the provided materials and course slots.
- A structural view putting the whole course into a more traditional table of contents
- Conversational view using a state-of-the-art LLM-based chatbot
Content management
- Easy to use admin backend
- Extensive use of convention over configuration to reduce the
- Flexible and extensible use of scalable object storage as a native store
Chatbot features
- Based on GPT-4o as a standard model, the model to be used can be configured (for each of the courses of components separately)
- Querying indexed documents (with metadata), implementing a RAG approach with per-course configuration of major parameters (like number of chunks)
- Configurable history management
- Generate topic suggestions
- Generate follow-up question suggestions
- Inline citations of the used materials for better traceability (with direct quotes)
- Multiple and configurable (in CMS) prompts chosen at runtime (dynamic prompt selection) (either via LLM or direct similarity search)
- Sidebar with suggested course materials relevant to the question
- Thumbs voting to improve the quality
- Extensive chatbot interaction logging and self-evaluation via LLM-as-a-judge
- Generate clarifying info prompts to the user
- Specialized tools (or functions) using an agentic workflow to make the LLM automatically choose what to include - especially useful for API-based integration of content.
- Supports advanced UML model generation via PlantUML rendering and specialized prompts
- Low-barrier improvement via directly supported Q&A
Flexible document indexing
- Wide range of documents such as pdf, md, docx, pptx, but also video transcripts (both vtt and YouTube)
- Periodic indexing of web sites and other content
- Observability of workflow execution
- Multiple indexing methods, including multimodal indexing
- Configurable indexing parameters, such as chunking strategy
- Easy reindexing and chunk inspection from the CMS
Evaluation and quality monitoring
- Anonymous logging
- Self evaluation using LLM-as-a-judge approaches
- Manual quality tagging and annotation for improvement
- Auto-expiring information (e.g., semester-related)
Extensible and customizable
- Many feature flags, supporting, e.g., synchronous courses (with timeline), asynchronous courses, or course-indepenten bots
- Themeable, supporting automatic and manual switching between light and dark mode
- Easy addition of new material types
- Supports multiple languages (or a course level)
- Models, prompts, and chatbot parameters directly configurable in CMS
- Extensive API and views designed to be embedded into other sites (fragments and OEmbed)
- Planned: compose chatbots from multiple courses or more specialized bots
Modern technologies
- FastAPI with Jinja2 (with JinjaX components) and extensive use of Pydantic
- Hypermedia-first approach using HTMX
- Reactive web design
- Built ontop of langchain
- Prefect as orchestrator for indexing tasks
- Pinecone Serverless as vector database
- MongoDB Atlas for history management
- Log observability with Pydantic's LogFire, GenAI observability with LangFuse