Skip to content

QA Assistant that can answer your questions using natural language — powered by OpenAI and LangChain.

Notifications You must be signed in to change notification settings

aiqualitylab/AI-QA-Assistant-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 QA Assistant Bot

AI-powered assistant for QA engineers
Uses OpenAI + LangChain to answer questions from test cases, feature files, logs, specs, and more — all from natural language.


🧠 Purpose

This bot helps QA engineers:

  • ✅ Ask natural questions like:
    "What are the steps in TC-001?"
    "List test cases for login."

  • 📄 Understand test specs and logs quickly

  • 🔍 Search across multiple formats (JSON, Markdown, PDF, etc.)

  • 🧪 Automate documentation understanding and reduce manual effort


📁 Supported File Types

It can read and index:

  • .json — Test cases
  • .feature — BDD specs
  • .md — Requirements
  • .txt — Logs
  • .html — Reports
  • .pdf — Test documents
  • .docx — Word specs

Place files inside the data/ folder.


⚙️ Installation

✅ 1. Clone the repo

git clone https://github.com/aiqualitylab/AI-QA-Assistant-Bot
cd qa-bot

✅ 2. Set up Python environment

Make sure Python 3.10+ is installed. Then:

pip install -r requirements.txt

✅ 3. Create .env file

In the project root, create a file called .env:

OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

🔐 You can get your API key from: https://platform.openai.com/account/api-keys

🚀 Run the Assistant

python bot.py

If it's your first run, it will index the documents. After that, it reuses the saved index.

You'll see:

🤖 QA Assistant Ready! Ask anything (type 'exit' to quit')

💬 Example Questions to Try

  • What is the expected result of TC-002?
  • What steps are in TC-003?
  • Summarize all login test cases.
  • What's inside the markdown spec?

🛠️ Optional Fix (LangChain warning)

If you see a deprecation warning about run(), you can change:

qa.run(query)

To:

qa.invoke(query)

✅ Tips

  • You can add any number of files inside the data/ folder
  • Re-run the bot to re-index updated content
  • The assistant uses FAISS + OpenAI to give accurate, contextual answers

📌 Project Structure

qa-bot/
├── data/                ← Your documents go here
├── bot.py               ← Main script
├── qa_utils.py         ← Loaders + vector index
├── requirements.txt     ← Python dependencies
├── .env                ← Your OpenAI API key

👨‍💻 Built With

  • LangChain
  • OpenAI API
  • FAISS Vector Search

About

QA Assistant that can answer your questions using natural language — powered by OpenAI and LangChain.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages