# 🌟 DoCoreAI – The Future of Smart AI Interactions  

**🚀 Optimize LLM Responses | 🛠️ Fine-Tune AI Intelligence | ⚡ Supercharge Prompting**  

---

## 🔥 What is DoCoreAI?  
DoCoreAI is an AI **intelligence profiler that optimizes prompts dynamically** based on predefined intelligence parameters. Instead of relying on generic LLM prompts, DoCoreAI customizes intelligence properties (such as reasoning, creativity, and precision) to ensure AI agents generate responses that perfectly align with their roles.

Its an **open-source powerhouse** designed to make **Large Language Models (LLMs) smarter, sharper, and more efficient**. It acts as a **plug-and-play optimizer** that dynamically enhances AI reasoning, problem-solving, and decision-making, giving developers total control over AI intelligence. 

Whether you're building an AI agent, chatbot, a virtual assistant, or a SaaS application, **DoCoreAI fine-tunes AI prompts in real time**, ensuring **clear, precise, and highly contextual responses**.  

---

## 🌍 Why DoCoreAI?  
### ✅ **Key Benefits**
- **🧠 Smarter AI** – Enhances reasoning, problem-solving, and adaptability.
- **⚡ Best Responses** – Intelligent prompts mean more accurate answers.
- **🔧 Full Control** – Developers can fine-tune intelligence parameters like depth, creativity, and accuracy.
- **🔌 Easy API Integration** – Works seamlessly with OpenAI, Cohere, Mistral, and other LLMs.
- **🛠️ Open-Source & Extensible** – Customize it for your specific use case.

  🚨Lets see some Problems:

  - Generic LLM prompts don’t tell AI agents how smart to be for a task.

  - LLMs respond the same way to different tasks, often lacking role-specific intelligence.

  - A customer support AI should be empathetic and clear, while a data analyst AI should be logical and precise.

  - Generic prompts fail to define the intelligence level needed to perform a task efficiently when some tasks need high reasoning, low creativity, while others need high creativity, low precision..

  The Solution:

  DoCoreAI solves this by intelligently adjusting skill parameters based on context, so LLMs generate perfect responses for each role, ensuring:
  - Better response accuracy
  - Improved AI agent adaptability
  - Optimized decision-making and creativity when needed

---

## 💡 How Does It Work?  

DoCoreAI follows a structured process to enhance AI prompts:

1️⃣ AI Role Detection – Identifies the AI agent’s role and task.  
2️⃣ Intelligence Mapping – Assigns reasoning, creativity, precision, and temperature values.  
3️⃣ Prompt Optimization – Fine-tunes the input prompt using optimized intelligence properties.  
4️⃣ LLM Execution – Sends the enhanced prompt to OpenAI, Groq, or other supported models.

💡 Example:  
**Before** DoCoreAI: "Summarize this report."  
**After** DoCoreAI: "Summarize this report with high precision (0.9), low creativity (0.2), and deep reasoning (0.8)."

### **🔗 Step-by-Step Workflow:**
1️⃣ **User Query →** A user submits a question/query to your application.  
2️⃣ **DoCoreAI Enhances Prompt →** The system analyzes the query or prompt and generates an optimized prompt with **dynamic intelligence parameters**. The required intelligence range  for each these parameters (like **Reasoning** - Determines logical depth, **Creativity** - Adjusts randomness , **Precision** - Controls specificity)  are inferred from the query automatically. 

3️⃣ **Send to LLM →** The refined prompt is sent to your preferred LLM (OpenAI, Anthropic, Cohere, etc.).  
4️⃣ **LLM Response →** The model returns a highly optimized answer.  
5️⃣ **Final Output →** Your application displays the AI’s enhanced response to the user.  

👉 **End Result?** More accurate, contextually rich, and intelligent AI responses that **feel human-like and insightful**.  

---

## 💡 How DoCoreAI Helps AI Agents

DoCoreAI ensures that AI agents perform at their best by customizing intelligence settings per task. Here’s how:  

📞 Support Agent AI → Needs high empathy, clarity, and logical reasoning.  
📊 Data Analyst AI → Requires high precision and deep analytical reasoning.  
🎨 Creative Writing AI → Boosts creativity for idea generation and storytelling.  

This adaptive approach ensures that LLMs deliver role-specific, optimized responses every time.

---

## 🚀 Use Cases
DoCoreAI is highly versatile and can be integrated across various domains:

🔹 Customer Support AI: Ensures friendly, concise, and empathetic interactions.  
🔹 Business Analytics AI: Generates precise reports with accurate insights.  
🔹 Medical AI Assistants: Maintains high reasoning while reducing creativity for factual correctness.  
🔹 Content Creation AI: Enhances creativity while keeping precision at a balanced level.  
🔹 Legal & Compliance AI: Ensures responses are strictly factual and highly precise.  

### 🏢 **For Businesses & Startups:**
- **🤖 AI Agents, Chatbots & Virtual Assistants** – Make AI interactions **more natural and helpful**.
- **📞 AI Customer Support** – Improve support accuracy, reducing agent workload.
- **📊 Data & Market Analysis** – Extract **meaningful insights from unstructured data**.
- **🎨 Creative AI** –  Enhances storytelling, content generation, and brainstorming.

### 🛠️ **For Developers & Engineers:**
- **⚙️ Fine-Tuning Custom LLMs** – Boost reasoning, logic, and adaptability.
- **📝 AI-Powered Content Generation** – Enhance blogs, marketing copy, and technical writing.
- **🧪 Research & Experimentation** – Test and build **next-gen AI applications**.  

### 🍒 **Generalized solution for All**
- **⚙️ Easily Works across all domains and user roles, allowing fine-tuning for different applications
  
---

## 🎯 Getting Started
### **📌 Installation**
You can install `docoreai` from PyPI using pip: and Quick test [Sample Code](./blob/main/tests/Quick%20Test/test.py)

```bash
pip install docoreai
```
OR

1️⃣ Clone the repo:
```bash
 git clone https://github.com/SajiJohnMiranda/DoCoreAI.git
```
2️⃣ Install dependencies:
```bash
pip install -r requirements.txt
```
3️⃣ Run DoCoreAI:
```bash
uvicorn api.main:app
```
4️⃣ Start using the API:
```bash
Browser POST "http://127.0.0.1:8000/docs" Select /intelligence-profiler-demo 
```

🎉 **You're all set to build smarter AI applications!**  

---

## 🔗 Integrations & Compatibility
DoCoreAI is designed to work seamlessly with major AI platforms:
- Works with **OpenAI GPT, Claude, LLaMA, Falcon, Cohere, and more.**
- Supports **LangChain, FastAPI, Flask, and Django.**
- Easy to extend via **plugin-based architecture.**

---

## 📈 Why Developers Should Use DoCoreAI

🔹 Smarter AI, Better Results  
-Ensures AI models understand the intelligence scope required for each task.  
-Enhances prompt efficiency, reducing trial and error in prompt engineering.

🔹 Saves Time & Effort  
-No need for manual prompt tuning—DoCoreAI does it for you.  
-Works out of the box with OpenAI and Groq models.

🔹 Ideal for SaaS & AI-driven Applications  
-Perfect for chatbots, AI assistants, automation, and enterprise AI solutions.  
-DoCoreAI transforms AI interactions by making prompts truly intelligent.

---

## 🌟 Join the Community:  
Let’s build the future of AI-powered intelligence tuning together! 🚀  
🤝 **Contribute:** Open issues, create pull requests, and help improve DoCoreAI!  
📢 **Discuss & Collaborate:** Join our **Discord & GitHub Discussions**.  
🌟 **Star the Repo!** If you find this useful, don’t forget to star ⭐ it on GitHub!  

👉 [GitHub Repo](https://github.com/SajiJohnMiranda/DoCoreAI) | [Docs (Coming Soon)]  

---

## Recommended LLMs for Intelligence Optimization
DoCoreAI is designed to refine and optimize user prompts by dynamically adjusting intelligence parameters such as reasoning, creativity, and precision. To achieve the best results, we recommend using ChatGPT (GPT-4-turbo) for this task.
While DoCoreAI is compatible with other LLMs (e.g., LLaMA 3, Claude etc), results may vary depending on the model’s capabilities. Developers are encouraged to experiment and contribute insights on different LLM integrations.

**Future Support for Fine-Tuned Models:**  
We recognize the growing demand for fine-tuned open-source models tailored for specific applications. In future updates, we aim to explore Integration with fine-tuned LLaMA/Custom GPT models, Support for locally deployed models (via Ollama, vLLM, etc.) & Customization of intelligence parameters based on domain-specific data.

Our vision is to make DoCoreAI adaptable to both proprietary and open-source AI models, ensuring flexibility for all developers. Contributions and suggestions are welcome!

---

## Finally Why DoCoreAI?

- It **quantifies prompt intelligence** instead of relying on trial-and-error prompts.
- AI **responds efficiently** when guided by reasoning, creativity, and precision metrics.

---

## How to set it up

After installing `docoreai`, create a `.env` file in the root directory with the following content:

```ini
# .env file
OPENAI_API_KEY="your-openai-api-key"
GROQ_API_KEY="your-groq-api-key"
DEFAULT_MODEL="openai"  # Choose 'openai' or 'groq'
MODEL='gpt-3.5-turbo' # Choose model  gpt-3.5-turbo, gemma2-9b-it etc
```
---

## ⚖️ License
Licensed under [MIT License](./LICENSE.md). Use freely, contribute, and enhance AI for everyone!    

---

💡 **Let’s revolutionize AI prompt optimization together!** 🚀

