langchain-teacher  by langchain-ai

Chat interface for interactive LangChain learning

created 2 years ago
260 stars

Top 98.2% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides an interactive, chat-based learning experience for the LangChain framework, targeting developers new to LangChain. It aims to simplify the learning process by offering guided lessons and interactive quizzes, accelerating user onboarding and understanding of LangChain's capabilities.

How It Works

The application leverages LangChain's own components to create an educational experience. Lessons are structured as .txt files within the lc_guides folder. A core prompt, defined in get_prompt.py, combines these lesson texts with user interaction history (via chat memory) and sends them to a Language Learning Model (LLM). This process generates bite-sized lessons and prompts, demonstrating prompt engineering techniques for LLM application development.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Run: streamlit run lc_main.py
  • Prerequisites: Python 3.10+, OpenAI API Key (required), LangChain Endpoint/API Key/Tracing (optional, for LangSmith integration).
  • Setup: Requires creating a .env file with API keys.
  • Demo: Hosted version available at lang-teacher.streamlit.app.

Highlighted Details

  • Offers two teaching styles: Instructional (step-by-step) and Interactive (question-based).
  • Utilizes prompt templates and chat memory to manage conversational learning flow.
  • Includes separate tutors for LangChain Expression Language (LCEL) and a supervisor-model branch for response supervision.

Maintenance & Community

  • Open to contributions for new lessons, examples, and use cases.
  • Issues and pull requests are welcomed for project improvement.

Licensing & Compatibility

  • Licensed under the MIT License.
  • Permissive license suitable for commercial use and integration with closed-source projects.

Limitations & Caveats

The prompt sent to the LLM can be quite large due to the inclusion of lesson content, indicating potential areas for token usage optimization.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.