Skip to content

RedSkull5143/framework-ai-assistant

Repository files navigation

🤖 AI-Native Selenium Framework Assistant

A Retrieval-Augmented AI system designed for architecture-aware automation engineering.


✨ Why This Project Exists

Modern LLMs are powerful — but in automation engineering, generic AI responses can:

  • Invent framework methods
  • Assume incorrect driver setup patterns
  • Break Page Object Model (POM) structure
  • Generate non-aligned test code

Automation frameworks demand architectural precision — not hallucinated code. This project solves that problem.


🧠 What This Assistant Does

Instead of answering blindly, this system:

  1. Scans your automation framework source code.
  2. Splits it into method-level chunks.
  3. Creates semantic embeddings locally.
  4. Stores them in a persistent vector database (ChromaDB).
  5. Retrieves relevant code before querying the LLM.
  6. Forces the LLM to answer strictly using retrieved context.

Note: If something is not implemented, it responds: "Not implemented in this framework." No guessing. No fabrication.


🏗 System Architecture

  • Automation Framework Source Code
  • Method-Level Chunking
  • SentenceTransformer Embeddings
  • ChromaDB (Persistent Vector Store)
  • Top-K Semantic Retrieval
  • Groq LLM (LLaMA 3.1)
  • Grounded, Framework-Aware Response

🎯 Example Queries

  • Where is the WebDriver instance created?
  • Is retry logic implemented?
  • Explain the login page implementation.
  • Generate a test aligned with the POM structure.
  • Validate architectural consistency.

⚙️ Quick Start

1️⃣ Install Dependencies

pip install -r requirements.txt

2️⃣ Configure Environment

Create a .env file in the root directory:

GROQ_API_KEY=your_api_key_here
FRAMEWORK_PATH=path_to_your_automation_framework

3️⃣ Generate Embeddings

python create_local_vector.py

4️⃣ Run the Assistant

python ai_assistant.py

🔐 Security & Clean Design

  • API keys are not committed.
  • vector_db/ is ignored via .gitignore.
  • Framework source code is not included in the repo.
  • Configurable framework path via .env.
  • Strict grounding enforced.

🧩 Design Philosophy

  • Strict grounding (no hallucination).
  • Architecture-aware AI responses.
  • Clean separation of concerns.
  • Controlled token usage.
  • Scalable RAG design principles.
  • Reliability over hype.

📊 Current Status

Phase 1 — Stable Grounded RAG Assistant (Implemented)

  • Method-level chunking
  • Metadata-aware embeddings
  • Persistent vector storage
  • Top-K semantic retrieval
  • Strict LLM response constraints
  • Clean CLI interface

Phase 2 — Future Roadmap (Planned)

  • Stacktrace failure analyzer
  • CI pipeline integration
  • Hybrid retrieval (vector + keyword)
  • Architecture review mode

🚀 Vision

Move toward AI-Native Automation Engineering, where LLM systems assist in debugging, onboarding, and maintaining architectural consistency without compromising structure or reliability.


🏷 Tech Stack

  • Language: Python
  • Embeddings: SentenceTransformers
  • Vector DB: ChromaDB
  • LLM: Groq (LLaMA 3.1)
  • Domain: Selenium Automation Framework

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages