An agent-based AI research assistant built with LangChain, Groq LLMs, and custom tools to automatically research a topic, validate facts, analyze trends, generate citations, and optionally save results to a file — all through a single prompt-driven workflow.
- 🔍 Wikipedia-first research (primary source validation)
- ✅ Fact checking to reduce hallucinations
- 📈 Trend & popularity analysis for topics
- 📚 Automatic citation generation
- 💾 Save research output to a file
- 🧩 Agent-based tool calling using LangChain
- 📦 Structured JSON output using Pydantic models
User Prompt
↓
Agent (LangChain)
↓
Tool Selection & Reasoning Loop
├── Wikipedia Search
├── Fact Check
├── Trend Analysis
├── Citation Generation
└── Save Output
↓
Structured JSON Response
| Layer | Technology |
|---|---|
| Language | Python |
| LLM | Groq – llama-3.3-70b-versatile |
| Agent Framework | LangChain |
| Output Validation | Pydantic |
| Secrets Management | dotenv |
-
User inputs a research topic.
-
The AI agent:
- Searches Wikipedia first
- Cross-checks facts using a fact-checking tool
- Analyzes popularity or trends
- Generates citations
- Optionally saves the output
-
The final response is always returned in structured JSON format:
{ "topic": "...", "summary": "...", "sources": ["..."], "tools_used": ["..."] }
| Tool | Description |
|---|---|
wiki_tool |
Fetches and verifies information from Wikipedia |
fact_check |
Validates claims against known sources |
analyze_trends |
Analyzes topic popularity or relevance |
generate_citation |
Produces citations for sources |
save_tool |
Saves generated research to a file |
.
├── main.py
├── tools.py
├── .env.example
├── requirements.txt
└── README.md
git clone https://github.com/Vinay-15/Technical_analyst_Agentic_AI.git
cd Technical_analyst_Agentic_AIpython -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtCreate a .env file (do not commit this):
GROQ_API_KEY=your_groq_api_key_hereYou can refer to .env.example for the format.
python main.pyYou’ll be prompted with:
What can I help you Research?
Example input:
Impact of AI on supply chain management
{
"topic": "AI in Supply Chain Management",
"summary": "Artificial intelligence is transforming supply chains by...",
"sources": ["Wikipedia", "Industry Reports"],
"tools_used": ["wiki_tool", "fact_check", "analyze_trends"]
}- API keys are managed using
.env .envis excluded via.gitignore- Always rotate keys if exposed
- Web UI or Streamlit interface
- Multi-source research beyond Wikipedia
- Confidence scoring for facts
- Async tool execution
- Vector-based memory for long-term research
Contributions, suggestions, and improvements are welcome! Feel free to fork the repo or open an issue.
- 🌐 Web UI (Streamlit / Next.js)
- 🧠 Multi-agent collaboration
- 🔗 External APIs (news, finance, healthcare)
- 🧾 Confidence scoring per claim
- 🗂️ Vector memory for long-term research
- Hackathons (LA Hacks, HackMIT, etc.)
- AI agent demos
- Research automation
- Tool-augmented LLM experiments
MIT License