Raiff1982's picture
Update prompt.txt
99a23ce verified
raw
history blame
4.5 kB
Create a comprehensive reasoning system that integrates various elements and perspectives to analyze and respond to tasks. The system should utilize sentiment analysis, handle sensitive information, and provide real-time data fetching capabilities. The code should include robust error handling, configuration management, asynchronous handling, dependency injection, unit testing, and security enhancements.
The goal is to integrate unique functionalities and methodologies from different code components into a cohesive system.
- **Initialization**: Utilize the AIConfig class to manage configuration settings, initialize models, and load encryption keys. Define perspectives using these configuration settings.
- **Memory Management**: Implement in-memory storage to track tasks, actions, and observations within classes like AIConfig and AICore.
- **Sentiment Analysis**: Use sentiment analysis tools such as VADER to classify emotions and align them with specified perspectives. Implement this through the NLP analysis pipelines within AICore class.
- **Action Determination and Execution**: Frame logic to determine upcoming actions based on memory and context, triggered by system inputs and perspectives like those initialized in AIConfig. Log all actions and information using the structured logging system already set up.
- **Sensitive Information Handling**: Build on the encryption capabilities of AICore to detect and mask sensitive information proactively.
- **Real-Time Data Fetching**: Integrate data fetching within functions to collect and provide real-time responses, utilizing proper error handling and asynchronous operations.
- **Command Processing and Response Generation**: Use APIs and processing functions to handle commands, manipulate data, generate responses aligning with the system's perspectives, and effectively save these responses.
- **Interaction Analysis**: Develop classes or methods that assess interactions between elements, with potential to evolve into full interactional narratives.
- **Configuration Management**: Apply pydantic or similar libraries to ensure validation and type-checking of configuration settings, keeping configurations consistent and clear.
- **Asynchronous Handling and Dependency Injection**: Ensure all appropriate functions perform asynchronously, utilizing asyncio within methods like those in AICore. Use dependency injection to enhance code modularity and testing potential.
- **Unit Testing and Code Documentation**: Incorporate unit testing to ensure code accuracy and future adaptability. Provide docstring annotations to enhance code clarity and future maintenance.
- **Security Enhancements**: Address potential security flaws by validating inputs, sanitizing outputs, and employing encryption where necessary.
# Steps
1. **Initialize Components**: Set up classes and dependencies such as AIConfig and AICore with necessary libraries and tools.
2. **Implement Memory Management**: Design in-memory structures to track task history and status.
3. **Develop Sentiment Analysis**: Integrate analysis tools like VADER, encouraging synergy with the existing NLP pipelines.
4. **Integrate Action Mechanics**: Create logic sequences to deduce actions based on system inputs and historical memory context.
5. **Apply Real-Time Data Incorporation**: Develop methods to supply real-time data, emphasizing asynchronous handling.
6. **Conduct System Testing and Revisions**: Deploy unit tests across various segments to ensure performance validation and execution.
# Output Format
- Detailed system log entries following structured logging guidelines.
- JSON representation of real-time responses integrating command outcomes and sentiment analyses.
- Asynchronous functions generating and retrieving specified outputs without traditional lock-in states.
# Examples
- Sentiment Analysis:
- Input: `"The customer service was amazing but the response time could be better."`
- Output: `{ "sentiment": "positive", "details": [ { "aspect": "service", "emotion": "contentment" }, { "aspect": "response", "emotion": "dissatisfaction" } ] }`
- Real-Time Response Generation:
- Input: `"Fetch latest news on AI development"`
- Output: `{ "headline": "...", "summary": "...", "source": "...", "timestamp": "..." }`
# Notes
- Ensure that all operations conform to security protocols and system thresholds as defined.
- Future implementations might include an expanded range of perspectives and analysis methodologies.