This file contains a series of prompts that can be used to guide an AI developer in building the Virtual AI Assistant project, as specified in the PRD.md. Each prompt corresponds to a phase in the project's roadmap.
Objective: Implement the core brain of the assistant, including the knowledge graph and LLM integration.
Prompt:
You are an expert C++ developer. Your task is to implement the 'Core Brain' of a virtual AI assistant. The project requirements are detailed in the PRD.md file.
Requirements:
- Integrate the existing
ElephantMemorylibrary: The project already includes a knowledge graph library calledElephantMemory. You need to use this library to store and retrieve information. - Integrate a Large Language Model (LLM): You need to integrate an LLM for natural language understanding and generation. The
PRD.mdsuggests usingOllamaorllama.cpp. You should choose one and implement the integration. - Create a
CoreBrainclass: This class will encapsulate the logic for the thinking process. It should be able to:- Receive a text query from the user.
- Query the
ElephantMemoryknowledge graph based on the user's query. - Formulate a prompt for the LLM, including the context from the knowledge graph.
- Send the prompt to the LLM and get a response.
- Process the LLM's response and store new information in the knowledge graph.
- Return a text response to the user.
- Update the
CMakeLists.txt: You need to update the build system to include the newCoreBrainclass and any new dependencies. - Create an example: You should update
examples/main.cppto demonstrate the functionality of theCoreBrainclass. The example should show how to ask a question, get a response, and how the knowledge graph is updated.
Technical Specifications:
- Programming Language: C++
- Core Libraries:
- Knowledge Graph:
ElephantMemory(existing) - LLM Integration:
Ollamaorllama.cpp
- Knowledge Graph:
- Build System:
CMake
You should start by exploring the existing ElephantMemory code to understand how it works. Then, proceed with the LLM integration and the creation of the CoreBrain class.
Objective: Implement the perception system, including continuous voice monitoring, VAD, speaker diarization, and speech-to-text.
Prompt:
You are an expert C++ developer. Your task is to implement the 'Perception' system of a virtual AI assistant. The project requirements are detailed in the PRD.md file.
Requirements:
- Continuous Voice Monitoring: Implement a system that continuously listens to the audio stream from the microphone. The
PRD.mdsuggests usingPortAudioorRtAudio. - Voice Activity Detection (VAD): Integrate a VAD library to detect when a user is speaking.
- Speaker Diarization: Implement a mechanism to identify when the assistant is being spoken to. This could be a simple keyword-based activation (e.g., 'Hey, Assistant!').
- Speech-to-Text: Integrate a speech-to-text library to transcribe spoken language into text. The
PRD.mdsuggestsVoskor a similar library. - Create a
Perceptionclass: This class will encapsulate the logic for the perception system. It should be able to:- Start and stop the audio monitoring.
- Detect voice activity.
- When activated, transcribe the user's speech to text.
- Pass the transcribed text to the
CoreBrainfor processing.
- Update the
CMakeLists.txt: You need to update the build system to include the newPerceptionclass and any new dependencies. - Create an example: You should create a new example file to demonstrate the functionality of the
Perceptionclass. The example should show how to start listening, detect speech, and transcribe it to text.
Technical Specifications:
- Programming Language: C++
- Audio Processing:
PortAudioorRtAudio - Speech-to-Text:
Voskor a similar library - Build System:
CMake
You should start by researching and choosing the appropriate libraries for audio processing and speech-to-text. Then, implement the Perception class and integrate it with the CoreBrain from Phase 1.
Objective: Implement the action system, including TTS and command execution.
Prompt:
You are an expert C++ developer. Your task is to implement the 'Action' system of a virtual AI assistant. The project requirements are detailed in the PRD.md file.
Requirements:
- Text-to-Speech (TTS): Integrate a TTS library to convert text responses from the
CoreBraininto speech. ThePRD.mdsuggestseSpeak,Flite, or a similar library. - Command Execution: Implement a mechanism to execute shell commands on the computer. This will allow the assistant to perform tasks like opening applications, running scripts, etc.
- Create an
Actionclass: This class will encapsulate the logic for the action system. It should be able to:- Receive a text response from the
CoreBrain. - If the response is a command, execute it.
- If the response is conversational, convert it to speech and play it to the user.
- Receive a text response from the
- Update the
CMakeLists.txt: You need to update the build system to include the newActionclass and any new dependencies. - Create an example: You should create a new example file to demonstrate the functionality of the
Actionclass. The example should show how to convert text to speech and how to execute a shell command.
Technical Specifications:
- Programming Language: C++
- Text-to-Speech:
eSpeak,Flite, or a similar library - Build System:
CMake
You should start by researching and choosing a suitable TTS library. Then, implement the Action class and integrate it with the CoreBrain.
Objective: Integrate all the components and perform thorough testing.
Prompt:
You are an expert C++ developer. Your task is to integrate and test the virtual AI assistant. You need to combine the CoreBrain, Perception, and Action systems into a cohesive application.
Requirements:
- Create a main application: Create a
main.cppfile that initializes and runs theCoreBrain,Perception, andActionsystems. The application should start by listening for the activation keyword. - Integrate the components:
- The
Perceptionsystem should pass the transcribed text to theCoreBrain. - The
CoreBrainshould process the text and return a response. - The
Actionsystem should receive the response from theCoreBrainand either speak it or execute it as a command.
- The
- Thorough Testing: You need to test the entire workflow:
- Test the activation keyword detection.
- Test the speech-to-text transcription.
- Test the interaction with the
CoreBrainand the knowledge graph. - Test the text-to-speech output.
- Test the command execution.
- Update the
CMakeLists.txt: You need to update the build system to create the final executable. - Documentation: You should update the
README.mdwith instructions on how to build and run the complete virtual AI assistant.
Technical Specifications:
- Programming Language: C++
- Build System:
CMake
You should focus on creating a stable and reliable application. Make sure to handle errors and edge cases gracefully.
Objective: Package the assistant as a standalone executable and deploy it to users.
Prompt:
You are an expert C++ developer. Your task is to package the virtual AI assistant as a standalone executable for different operating systems.
Requirements:
- Cross-Platform Build: Ensure that the project can be built on Windows, macOS, and Linux. You might need to adjust the
CMakeLists.txtfile to handle platform-specific dependencies and settings. - Create a Standalone Package: Create a script or use a tool (like
CPackwithCMake) to package the application and all its dependencies into a single, easy-to-install package for each target platform. - Installation Instructions: Create detailed installation instructions for each platform. This should be added to the
README.mdor a separateINSTALL.mdfile. - Release on GitHub: Create a new release on the project's GitHub repository with the packaged executables.
Technical Specifications:
- Build System:
CMake - Packaging:
CPackor similar
You should aim to make the installation process as simple as possible for the end-user.