An open API service indexing awesome lists of open source software.

https://github.com/klauseduard/concept-explainer

Explain complex concepts using LLMs (OpenAI/Ollama) - an educational tool for concept explanation, technical documentation, and knowledge sharing. Built during the early LLM boom (2023), updated with local model support (2025).
https://github.com/klauseduard/concept-explainer

ai concept-explanation edtech education educational-tool experiment knowledge-sharing learning llm machine-learning nlp ollama openai teaching technical-documentation

Last synced: about 2 months ago
JSON representation

Explain complex concepts using LLMs (OpenAI/Ollama) - an educational tool for concept explanation, technical documentation, and knowledge sharing. Built during the early LLM boom (2023), updated with local model support (2025).

Awesome Lists containing this project

README

          

# Concept Explainer

> A coding experiment from the early days of the LLM boom (2023), now updated with local LLM support.

_Note: This documentation was updated in February 2025 using Claude 3.5 Sonnet._

[🇪🇪 Eestikeelne versioon (Estonian)](README_ET.md)

This is a simple tool that uses LLMs to explain concepts through simulated conversations. Originally built with OpenAI's API during the initial ChatGPT excitement, it has now been updated to also work with Ollama for local, offline usage.

**Note:** Currently, the tool only accepts input in English (concept, role, and audience). Support for other languages may be added in the future.

## What it does

Given a concept, a specialist role, and a target audience, it generates an explanation in a dialogue format. For example:
- Concept: "black holes"
- Specialist: "astrophysicist"
- Audience: "five-year-old"

The output is formatted in Markdown and includes:
- Basic explanation
- Follow-up questions and answers
- Examples where possible
- Brief etymology and history
- Related concepts

## Features

- Works with OpenAI API (original version) or Ollama (new in 2025)
- Command line and basic web interface
- Saves explanations as Markdown files
- Simple search functionality

## Installation

You need Python 3.6+ and either:
- An OpenAI API key, or
- Ollama installed locally (free, works offline)

```bash
git clone https://github.com/klauseduard/concept-explainer.git
cd concept-explainer
pip install -r requirements.txt
```

Configure your `.env` file:
```bash
# For OpenAI:
LLM_PROVIDER=openai
OPENAI_API_KEY=your-api-key-here
OPENAI_MODEL=gpt-3.5-turbo
OPENAI_TEMPERATURE=0.2

# Or for Ollama:
LLM_PROVIDER=ollama
OLLAMA_HOST=http://localhost:11434
OLLAMA_MODEL=mistral-small
OLLAMA_TEMPERATURE=0.2
```

## Usage

### Console Interface

Basic command format:
```bash
python explain.py --additional_context
```

Example:
```bash
python explain.py "black holes" "astrophysicist" "five-year-old" --additional_context "Assume they know what stars are."
```

### Web Interface

Start the web interface:
```bash
python web_interface.py
```

Then open `http://localhost:5000` in your browser.

## Configuration

### OpenAI Provider (original)
- Requires API key
- Default model: `gpt-3.5-turbo`
- Also supports: `gpt-3.5-turbo-0125`, `gpt-4`, `gpt-4-0125`
- Should work with newer models as they become available
- See pricing at: https://openai.com/pricing

### Ollama Provider (new)
- Free, runs locally
- Default model: `mistral-small`
- Also works with: `llama2`, `codellama`, `neural-chat`
- Should work with any model supported by Ollama
- No API key needed
- Requires some CPU/GPU power

### Temperature Setting
- Range: 0.0 to 2.0 (default: 0.2)
- Lower = more focused
- Higher = more creative

## License

MIT

## Contact

Klaus-Eduard Runnel - klaus.eduard@gmail.com

Project Link: [https://github.com/klauseduard/concept-explainer](https://github.com/klauseduard/concept-explainer)