GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ShinyPhoenix000/rag-coding-helper: RAG-Powered Coding Helper is a Python tool that uses Retrieval-Augmented Generation (RAG) to answer questions about API documentation, cheat sheets, and coding guides.

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
app
app
 
 
data
data
 
 
rag
rag
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

RAG-Powered Coding Helper

A Python tool to query API documentation and technical cheat sheets using Retrieval-Augmented Generation (RAG). Ingests Markdown docs, builds a semantic vector store (FAISS), and answers natural language questions with relevant code snippets or explanations.

Project Structure

rag-coding-helper/
├── main.py                # CLI entry point
├── requirements.txt       # Python dependencies
├── README.md              # Project documentation
├── LICENSE                # MIT License
├── .gitignore             # Git ignore rules
├── data/                  # Markdown docs (API, cheatsheets)
│   ├── pandas.md
│   ├── requests.md
│   ├── ...
├── rag/                   # Core RAG logic
│   ├── helper.py
│   ├── retriever.py
│   ├── llm.py
│   └── __init__.py
├── app/                   # (Optional) App entrypoints
│   └── main.py
├── tests/                 # Unit tests
│   └── test_llm.py

Features

  • Ingests Markdown documentation and cheat sheets
  • Builds a FAISS vector store for fast semantic search
  • Supports HuggingFace, OpenAI, or mock embeddings (offline)
  • Natural language question answering with code snippet retrieval
  • Extensible: add your own docs to data/

Installation

  1. Clone the repository
    git clone https://github.com/yourusername/rag-coding-helper.git
    cd rag-coding-helper
  2. Create a virtual environment
    python3 -m venv .venv
    source .venv/bin/activate
  3. Install dependencies
    pip install -r requirements.txt
  4. (Optional) Set OpenAI API key
    • For OpenAI embeddings, set your API key:
      export OPENAI_API_KEY=your-key-here

Usage Example

Run the CLI and ask a question:

python main.py

Sample session:

Building vectorstore...
Vectorstore ready. You can now ask questions!

Ask a question (or type 'exit' to quit): How do I create a DataFrame in pandas?

Answer:
df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
print(df)

Ask a question (or type 'exit' to quit): exit
Goodbye!

Configuration

  • Mock Embeddings (default):
    • Works offline, no API keys needed.
    • Set use_mock=True (default in code).
  • HuggingFace Embeddings:
    • Install sentence-transformers.
    • Set USE_HUGGINGFACE = True in rag/retriever.py.
  • OpenAI Embeddings:
    • Set USE_HUGGINGFACE = False in rag/retriever.py.
    • Set your OPENAI_API_KEY environment variable.

Contributing

  • Fork the repo and create a feature branch
  • Write clear, well-documented code
  • Add or update tests in tests/
  • Submit a pull request with a clear description

License

This project is licensed under the MIT License © 2025 ShinyPhoenix000.

References

  • LangChain
  • FAISS
  • HuggingFace Transformers

About

RAG-Powered Coding Helper is a Python tool that uses Retrieval-Augmented Generation (RAG) to answer questions about API documentation, cheat sheets, and coding guides.

Topics

codeassistantembeddingsfaisshuggingfacenlppythonrag

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.