- Build the project:
mvn clean package
- Run the Chatbot GUI:
- From the command line:
java -cp target/classes org.k11techlab.framework.ai.chatbot.ChatbotGUI
- Or, from your IDE, run the
mainmethod inChatbotGUI.java.
- From the command line:
- Run RAGKnowledgeChatbot or StrictFrameworkRAGChatbot from CLI:
java -cp target/classes org.k11techlab.framework.ai.chatbot.RAGKnowledgeChatbot java -cp target/classes org.k11techlab.framework.ai.chatbot.StrictFrameworkRAGChatbot
- Or, create a small demo class with a
mainmethod that instantiates and uses these classes.
- Or, create a small demo class with a
- Configure AI providers and RAG settings:
- Edit
config/chatbot.ai.propertiesto set provider order, max tokens, context length, etc.
- Edit
- (Optional) Use screenshots and code samples below to explore features.
This demo showcases the Retrieval-Augmented Generation (RAG) and NLP-powered chatbot built into the K11 Tech Lab Selenium Java Automation Framework. The chatbot delivers context-aware, framework-specific answers, generates test cases, and provides conversational assistance for automation engineers.
- Retrieval-Augmented Generation (RAG): Combines LLMs (OpenAI, Ollama, HuggingFace, LM Studio) with a persistent knowledge base.
- Configurable AI Provider Pipeline: Select and prioritize providers via config.
- Strict Knowledge-Base-Only Mode: Ensures answers are grounded in your framework docs/code.
- Modern Chatbot GUI: Branded, user-friendly interface with source references and timestamps.
- Test Automation Ready: Generates, explains, and troubleshoots Selenium test cases.
Run the following command or launch from your IDE:
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(() -> {
new ChatbotGUI().setVisible(true);
});
}String question = "How do I implement a self-healing Selenium locator?";
String answer = chatbot.answerFrameworkQuestionOnly(question);
System.out.println(answer);String testPrompt = "Generate test cases for an e-commerce checkout flow.";
String testCases = chatbot.answerFrameworkQuestionOnly(testPrompt);
System.out.println(testCases);# chatbot.ai.properties
chatbot.rag.maxContextLength=3000
chatbot.rag.maxTokens=1200
chatbot.rag.maxRetrievedDocs=3
ai.provider.priority=OPENAI,OLLAMA,SIMPLE- Get instant, accurate answers grounded in your own framework.
- Save time, reduce onboarding friction, and boost test coverage and quality.
- Robust, extensible, and ready for enterprise use.
flowchart TD
%% User Layer
A[User / Engineer] -->|Natural Language Query| B(Chatbot / NLP Engine)
%% NLP & Intent
B -->|Intent Recognition| C{Intent}
%% Intent Branches
C -->|Knowledge Query| D[RAG Engine]
C -->|Framework Action| M[Automation Framework]
%% RAG Internal Flows
D -->|Semantic Search| E[Knowledge Base]
D -->|Embedding Lookup| F[Embedding Cache]
D -->|LLM Completion| G[LLM Provider Manager]
%% Providers
G --> H1["Cloud / Local LLMs"]
H1 --> H2["OpenAI, HuggingFace, Ollama"]
%% Return path
E --> D
F --> D
H --> D
D -->|Synthesized Answer| B
B -->|Conversational Response| A


