A collection of hands-on LLM (Large Language Model) engineering projects demonstrating practical applications of AI in real-world scenarios.
- Project 1: Scraper Summarizer
- Project 2: Synthetic Data Generator
- Project 3: Code Generator with HuggingFace Deployment
- Project 4: Python to C++ Converter
- Project 5: Your Local RAG Assistant
- Project 6: LangGraph
- Project 7: RAG Solutions
- Project 8: News Research Assistant
- Getting Started
- Requirements
A comprehensive web scraping and summarization toolkit that leverages both proprietary and open-source LLMs to analyze and summarize website content.
This project demonstrates how to build intelligent web scrapers that can:
- Extract and clean content from websites
- Generate concise summaries using AI
- Create professional business brochures from company websites
- Work with both cloud-based (OpenAI) and local (Ollama) models
1_Scraper_Summarizer/
βββ 1.1_Scraper_Summarizer.ipynb # Basic scraper using OpenAI GPT-4o-mini
βββ 1.2_Scraper_Summarizer_Ollama.ipynb # Local implementation using Ollama
βββ 1.3_BusinessBrochureGenerator.ipynb # Advanced multi-page brochure generator
- Web Scraping: Uses BeautifulSoup to extract clean text from websites
- AI Summarization: Leverages OpenAI's GPT-4o-mini for intelligent content summarization
- Markdown Output: Generates well-formatted summaries
- System & User Prompts: Demonstrates proper prompt engineering techniques
Key Technologies:
requests&BeautifulSoupfor web scraping- OpenAI API for summarization
- Custom
Websiteclass for content extraction
- Local AI Models: Run LLMs locally using Ollama (Llama 3.2, DeepSeek)
- Privacy-First: No data leaves your machine
- Cost-Free: No API charges
- Multiple Integration Methods: Direct HTTP calls, Ollama package, or OpenAI-compatible API
Benefits:
- β No API costs
- β Complete data privacy
- β Works offline
β οΈ Requires local compute resources
Supported Models:
- Llama 3.2 (3B parameters)
- Llama 3.2:1b (lightweight variant)
- DeepSeek-R1:1.5b (reasoning model)
- Multi-Page Analysis: Intelligently identifies and scrapes relevant company pages
- Smart Link Detection: Uses LLM to determine which links are relevant (About, Careers, etc.)
- Structured Output: Generates professional markdown brochures
- Streaming Responses: Real-time typewriter-style output
- Customizable Tone: Easily adjust from professional to humorous
Workflow:
- Scrape company landing page
- AI identifies relevant links (About, Careers, Services)
- Scrape identified pages
- Generate comprehensive brochure from all content
- Stream formatted output
Use Cases:
- Competitive analysis
- Investor presentations
- Recruitment materials
- Market research
- Sales enablement
- Content Generation: Automatically create marketing materials
- Competitive Intelligence: Analyze competitor websites at scale
- Lead Qualification: Quickly understand prospect companies
- Market Research: Summarize industry trends from multiple sources
- Documentation: Generate company overviews for internal use
Basic Summarization:
from scraper import Website, summarize, display_summary
# Simple summary
display_summary("https://example.com")Business Brochure Generation:
from brochure_generator import create_brochure, stream_brochure
# Generate streaming brochure
stream_brochure("Company Name", "https://company.com")Local Model with Ollama:
import ollama
response = ollama.chat(
model="llama3.2",
messages=[{"role": "user", "content": "Summarize this content..."}]
)For OpenAI Version:
- OpenAI API key (set in
.envfile) - Python packages:
requests,beautifulsoup4,openai,python-dotenv
For Ollama Version:
- Ollama installed locally (ollama.com)
- Models pulled:
ollama pull llama3.2 - Python packages:
requests,beautifulsoup4,ollama
A powerful tool for generating realistic synthetic datasets using LLMs, supporting multiple data formats and both cloud and local models.
This project provides two implementations for generating synthetic datasets tailored to specific business problems:
- Version 1: Uses HuggingFace models (DeepSeek, Llama, Qwen2) with quantization
- Version 2: Uses OpenAI/Claude with code generation and execution capabilities
2_Synthetic_Data_Generator/
βββ 2.1_Synthetic_Data_Generator_v1.ipynb # HuggingFace-based generator
βββ 2.2_Synthetic_Dataset_Generator_v2.ipynb # OpenAI/Claude with code execution
- Multiple Open-Source Models:
- DeepSeek-LLM-7B-Chat
- Meta-Llama-3.1-8B-Instruct
- Qwen2-7B-Instruct
- 4-bit Quantization: Efficient model loading with BitsAndBytes
- Gradio UI: User-friendly web interface
- Format Support: CSV, JSON, Tabular
- Customizable Record Count: 50, 100, 150, or 200 records
Key Features:
- GPU acceleration support
- Streaming text generation
- Chat template formatting
- Memory-efficient quantization
- Dual Model Support: OpenAI GPT-4o-mini and Claude 3.5 Sonnet
- Dataset Types:
- Tabular Data: Structured datasets with columns
- Time-Series Data: Temporal datasets
- Text Data: Unstructured text datasets
- Output Formats: JSON, CSV, Parquet, Markdown
- Code Generation: Automatically generates Python code for dataset creation
- Code Execution: Runs generated code in virtual environment
- Multi-Entity Support: Separates output into multiple files when needed
Workflow:
- User describes business problem
- Specifies dataset type and format
- LLM generates dataset structure and Python code
- Code is extracted and executed locally
- Dataset files are saved automatically
- ML Model Training: Generate training data when real data is scarce
- Testing & QA: Create realistic test datasets
- Privacy Compliance: Replace sensitive data with synthetic alternatives
- Prototyping: Quickly create mock data for demos
- Data Augmentation: Expand existing datasets
- Simulation: Model business scenarios with synthetic data
Version 1 (HuggingFace):
# Generate dataset using Gradio interface
# 1. Enter business description
# 2. Select model (DeepSeek/Llama/Qwen2)
# 3. Choose format (CSV/JSON/Tabular)
# 4. Set number of records
# 5. Click GenerateVersion 2 (OpenAI/Claude):
from dataset_generator import generate_dataset
# Generate and execute
result = generate_dataset(
business_problem="E-commerce product catalog",
dataset_format="Tabular",
file_format="csv",
num_samples=100,
model="GPT"
)- Structured rows and columns
- Perfect for databases and spreadsheets
- Example: Customer records, product inventories
- Temporal sequences
- Date/timestamp indexed
- Example: Stock prices, sensor readings, user activity logs
- Unstructured text content
- Natural language datasets
- Example: Product descriptions, customer reviews, support tickets
Both versions include interactive web UIs with:
- Input Fields: Business problem description
- Dropdowns: Model selection, format selection, sample count
- Buttons: Generate dataset, execute code
- Output Panels: Display generated data and execution results
- Real-time Streaming: Watch generation in progress
Version 1 (HuggingFace):
- HuggingFace account and token
- GPU recommended (CUDA support)
- Python packages:
transformers,torch,bitsandbytes,gradio,huggingface_hub
Version 2 (OpenAI/Claude):
- OpenAI API key and/or Anthropic API key
- Python packages:
openai,anthropic,gradio,pandas,numpy
An advanced code translation system that converts Python code to high-performance C++ using frontier LLMs and open-source models deployed on HuggingFace endpoints.
This project demonstrates:
- Converting Python code to optimized C++ using AI
- Deploying open-source models to production via HuggingFace endpoints
- Building interactive code conversion interfaces with Gradio
- Benchmarking performance improvements (4x-15x speedup)
- Cross-platform C++ compilation (Windows, Linux, macOS)
3_Code_Generator_with_HuggingFace_Deployment_&_UI/
βββ Code_Generator_with_HuggingFace_Deployment.ipynb # Full implementation
βββ Final_UI.png # UI screenshot
- Multi-Model Support:
- OpenAI GPT-4o / GPT-4o-mini
- Claude 3.5 Sonnet / Claude 3 Haiku
- CodeQwen1.5-7B-Chat (HuggingFace)
- CodeGemma-7B-IT (HuggingFace)
- Streaming Responses: Real-time code generation with typewriter effect
- Automatic Compilation: Compiles and executes generated C++ code
- Performance Benchmarking: Side-by-side Python vs C++ execution comparison
- Cross-Platform Support: Auto-detects and uses appropriate compiler
- Production-Ready: Deploy open-source models behind API endpoints
- Inference Endpoints: Use HuggingFace's managed infrastructure
- Cost-Effective: Pay only for compute time used
- Scalable: Easy to scale up/down based on demand
- Dual Code Panels: Python input and C++ output side-by-side
- Model Selection: Switch between GPT, Claude, and CodeQwen
- Sample Programs: Pre-loaded examples (Pi calculation, max subarray)
- Execution Buttons: Run Python and C++ code with one click
- Results Comparison: Visual comparison of outputs and execution times
- Compiler Detection: Automatically identifies available compilers
Convert computationally intensive Python code to C++ for:
- Scientific computing
- Data processing pipelines
- Algorithm implementations
- Numerical simulations
Test 1: Pi Calculation (100M iterations)
- Python: 15.23 seconds
- C++: 0.22 seconds
- Speedup: ~70x faster
Test 2: Maximum Subarray Sum (10K elements, 20 runs)
- Python: 3.25 seconds
- C++: 0.21 seconds
- Speedup: ~15x faster
system_message = "You are an assistant that reimplements Python code in high performance C++ for an M1 Mac. "
system_message += "Respond only with C++ code; use comments sparingly and do not provide any explanation other than occasional comments. "
system_message += "The C++ response needs to produce an identical output in the fastest possible time."- Generate: LLM converts Python to C++
- Clean: Remove markdown code fences
- Write: Save to
optimized.cpp - Compile: Auto-detect and use appropriate compiler
- Execute: Run and capture output
- Compare: Display results side-by-side
- macOS: Clang++ with
-O3 -march=native - Linux: GCC (g++) or Clang++
- Windows: Visual Studio 2019/2022 (cl.exe)
-
Create Endpoint:
- Visit HuggingFace Endpoints
- Select model (CodeQwen1.5-7B-Chat or CodeGemma-7B-IT)
- Choose instance type and region
- Deploy endpoint
-
Get Endpoint URL:
CODE_QWEN_URL = "https://your-endpoint.endpoints.huggingface.cloud"
-
Use in Code:
from huggingface_hub import InferenceClient client = InferenceClient(CODE_QWEN_URL, token=hf_token) stream = client.text_generation(prompt, stream=True, max_new_tokens=3000)
-
Important: Pause endpoints when not in use to avoid charges!
Required:
- OpenAI API key (for GPT models)
- Anthropic API key (for Claude models)
- HuggingFace token (for endpoint access)
- C++ compiler (Clang++, GCC, or Visual Studio)
Python Packages:
pip install openai anthropic gradio huggingface_hub transformers python-dotenvCompilers:
- macOS: Xcode Command Line Tools (
xcode-select --install) - Linux: GCC (
sudo apt install g++) or Clang (sudo apt install clang) - Windows: Visual Studio 2019/2022 with C++ tools
The interactive UI includes:
- Python Code Editor: Input your Python code
- C++ Code Display: View generated C++ code
- Model Selector: Choose GPT, Claude, or CodeQwen
- Sample Programs: Quick-load example code
- Run Buttons: Execute Python and C++ independently
- Output Panels: Compare results and execution times
- Compiler Info: Display detected compiler and architecture
HuggingFace Endpoints:
- Pay per compute hour (varies by instance type)
- Important: Pause endpoints when not in use!
- Alternative: Use Modal for pay-per-use pricing
API Costs:
- GPT-4o-mini: Most cost-effective for this task
- Claude 3 Haiku: Budget-friendly alternative
- CodeQwen (self-hosted): No per-request costs
tokenizer = AutoTokenizer.from_pretrained(code_qwen)
messages = messages_for(python_code)
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)The system automatically detects and tests compilers:
- Writes test C++ program
- Attempts compilation with available compilers
- Verifies execution
- Selects best option for platform
All models support streaming for real-time feedback:
def stream_gpt(python):
stream = openai.chat.completions.create(
model=OPENAI_MODEL,
messages=messages_for(python),
stream=True
)
reply = ""
for chunk in stream:
fragment = chunk.choices[0].delta.content or ""
reply += fragment
yield reply- Legacy Code Migration: Modernize Python codebases to C++
- Performance Engineering: Optimize critical code paths
- Algorithm Development: Prototype in Python, deploy in C++
- Education: Learn C++ by seeing Python translations
- Code Review: Understand performance implications
- Cross-Language Teams: Bridge Python and C++ developers
A streamlined version of the code generator focused on practical Python-to-C++ conversion with comprehensive compiler support and performance benchmarking.
This project provides a production-ready tool for:
- Converting Python algorithms to high-performance C++
- Automatic compiler detection across all platforms
- Side-by-side performance comparison
- Interactive web interface for easy use
4_Python_to_C++_Convertor_with_UI/
βββ Python_to_C++_Convertor.ipynb # Core conversion logic
βββ Python_to_C++_Convertor_with_UI.ipynb # Full Gradio interface
βββ Final_UI.png # UI screenshot
- Two-Model Support: GPT-4o and Claude 3.5 Sonnet
- Optimized Prompts: Tuned for accurate C++ generation
- Identical Output Guarantee: Ensures Python and C++ produce same results
- Performance Focus: Optimizations for fastest execution time
- Simpler Setup: No HuggingFace endpoints required
- Better Compiler Detection: Robust cross-platform support
- Enhanced UI: More intuitive interface
- Sample Programs: Built-in examples to get started quickly
Calculates Ο using the Leibniz formula with 100 million iterations:
def calculate(iterations, param1, param2):
result = 1.0
for i in range(1, iterations+1):
j = i * param1 - param2
result -= (1/j)
j = i * param1 + param2
result += (1/j)
return result
result = calculate(100_000_000, 4, 1) * 4Results:
- Python: ~15 seconds
- C++: ~0.22 seconds
- Improvement: 68x faster
Implements Kadane's algorithm with random number generation:
def max_subarray_sum(n, seed, min_val, max_val):
# Linear Congruential Generator
lcg_gen = lcg(seed)
random_numbers = [next(lcg_gen) % (max_val - min_val + 1) + min_val
for _ in range(n)]
# Find maximum subarray sum
max_sum = float('-inf')
for i in range(n):
current_sum = 0
for j in range(i, n):
current_sum += random_numbers[j]
if current_sum > max_sum:
max_sum = current_sum
return max_sumResults:
- Python: ~3.2 seconds
- C++: ~0.21 seconds
- Improvement: 15x faster
The project includes intelligent compiler detection:
def c_compiler_cmd(filename_base):
# Automatically detects and tests:
# - Windows: Visual Studio 2022, 2019
# - Linux: GCC, Clang++
# - macOS: Clang++ with Apple Silicon optimizations
# Returns: [Platform, Compiler, Command]Supported Compilers:
- Windows:
- Visual Studio 2022 Community
- Visual Studio 2019 Build Tools
- Linux:
- GCC (g++)
- Clang++
- macOS:
- Clang++ (with
-march=nativefor M1/M2/M3)
- Clang++ (with
Layout:
βββββββββββββββββββββββββββββββββββββββββββββββ
β Python Code β C++ Code β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β Sample Program β Architecture β
β Model Selection β Compiler Info β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β [Convert Code] β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β [Run Python] β [Run C++] β
βββββββββββββββββββββββββββββββββββββββββββββββ€
β Python Output β C++ Output β
βββββββββββββββββββββββββββββββββββββββββββββββ
Features:
- Color-coded output panels (Python: blue, C++: green)
- Real-time streaming during conversion
- Automatic compiler status display
- One-click sample program loading
Basic Conversion:
# In Jupyter notebook
from converter import optimize_gpt, execute_cpp
python_code = """
# Your Python code here
"""
# Generate C++ code
optimize_gpt(python_code)
# Compile and run
result = execute_cpp(generated_cpp)
print(result)Using Gradio Interface:
- Select a sample program or paste your own Python code
- Choose model (GPT or Claude)
- Click "Convert code"
- Watch C++ code generate in real-time
- Click "Run Python" and "Run C++" to compare performance
-
Compilation vs Interpretation:
- C++ compiles to native machine code
- Python interprets bytecode at runtime
-
Memory Management:
- C++ has direct memory control
- Python has garbage collection overhead
-
Type System:
- C++ uses static typing (compile-time optimization)
- Python uses dynamic typing (runtime checks)
-
Compiler Optimizations:
-O3: Aggressive optimization-march=native: CPU-specific instructions- Loop unrolling, vectorization, inlining
Use Python When:
- Rapid prototyping needed
- Code readability is priority
- Development time is limited
- Performance is acceptable
Use C++ When:
- Performance is critical
- Processing large datasets
- Real-time requirements
- Embedded systems
- Algorithm Optimization: Speed up critical code paths
- Data Processing: Handle large-scale data efficiently
- Scientific Computing: Accelerate simulations and calculations
- Game Development: Optimize game logic and physics
- Financial Systems: High-frequency trading algorithms
- IoT/Embedded: Resource-constrained environments
Required:
- OpenAI API key or Anthropic API key
- C++ compiler installed
- Python 3.8+
Python Packages:
pip install openai anthropic gradio python-dotenvCompiler Installation:
macOS:
xcode-select --installLinux (Ubuntu/Debian):
sudo apt update
sudo apt install g++ clangWindows:
- Download Visual Studio Community 2022
- Select "Desktop development with C++"
| Feature | Project 3 | Project 4 |
|---|---|---|
| Models | GPT, Claude, CodeQwen, CodeGemma | GPT, Claude |
| Setup | Requires HuggingFace endpoints | Direct API only |
| Complexity | Advanced (deployment focus) | Simplified (usage focus) |
| Compiler | Basic detection | Robust cross-platform |
| UI | Standard Gradio | Enhanced with colors |
| Best For | Learning deployment | Production use |
The system ensures C++ produces identical results:
- Preserves random number generator behavior
- Maintains numerical precision
- Handles edge cases (overflow, underflow)
- Uses appropriate data types (long long, double)
# macOS/Linux
clang++ -O3 -std=c++17 -march=native -o optimized optimized.cpp
# Windows
cl /O2 /std:c++17 optimized.cppFlags Explained:
-O3: Maximum optimization level-std=c++17: Use C++17 standard-march=native: Optimize for current CPU/O2: Windows optimization level 2
- Set up environment:
# Create .env file
echo "OPENAI_API_KEY=your-key-here" > .env
echo "ANTHROPIC_API_KEY=your-key-here" >> .env- Install compiler:
# macOS
xcode-select --install
# Linux
sudo apt install g++
# Windows: Install Visual Studio- Run notebook:
jupyter notebook
# Open Python_to_C++_Convertor_with_UI.ipynb
# Run all cells- Use interface:
- Interface opens at
http://127.0.0.1:7860 - Select sample program or paste code
- Click "Convert code"
- Compare results!
For Best Results:
- Use
-O3optimization flag - Enable
-march=nativefor CPU-specific optimizations - Profile code to identify bottlenecks
- Consider parallelization for multi-core systems
- Use appropriate data structures
Common Optimizations:
- Replace Python lists with C++ vectors
- Use
std::arrayfor fixed-size arrays - Leverage
constexprfor compile-time computation - Minimize memory allocations
- Use references to avoid copies
A complete Retrieval-Augmented Generation (RAG) system that creates and queries a local vector database from your documents, enabling accurate question-answering with source attribution.
This project demonstrates building a production-ready RAG system:
- Create vector databases from local documents (PDF, DOCX)
- Use free HuggingFace embeddings or OpenAI embeddings
- Visualize embeddings in 2D using t-SNE
- Query documents with natural language
- Get answers with source attribution
- Interactive Gradio chat interface
5_Your_Local_RAG_Assistant/
βββ 5.1_Your_Local_RAG_Creation.ipynb # Vector database creation
βββ 5.2_Your_Local_RAG_Retreival.ipynb # Query and retrieval system
- Document Discovery: Recursively finds PDF and DOCX files
- Document Loading: Uses LangChain loaders (PyPDFLoader, Docx2txtLoader)
- Text Chunking: Splits documents into manageable chunks with overlap
- Embedding Options:
- OpenAI Embeddings (paid, high quality)
- HuggingFace Sentence Transformers (free, good quality)
- Vector Database: Chroma DB with SQLite backend
- Visualization: 2D t-SNE plots of embedding space
Key Features:
# Find and load documents
document_paths = find_documents(search_directory)
documents = load_documents(document_paths)
# Chunk and embed
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
chunks = text_splitter.split_documents(documents)
# Create vector store with free embeddings
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
vectorstore = Chroma.from_documents(documents=chunks, embedding=embeddings, persist_directory="mj_vector_db")- Vector Database Loading: Load existing Chroma databases
- Conversational Retrieval: LangChain ConversationalRetrievalChain
- Source Attribution: Includes source documents in responses
- Multi-Model Support: Switch between GPT and Claude
- Memory: Conversation history tracking
- Streaming Responses: Real-time answer generation
- Gradio Chat Interface: User-friendly web UI
Advanced Features:
# Custom prompt with source information
template = """Answer the question based on the following context and include relevant source information:
Context with Sources: {context}
Question: {question}
Please provide your answer along with the sources used:"""
# Format documents with metadata
def format_docs_with_metadata(docs):
formatted_docs = []
for doc in docs:
metadata_str = "\n".join([f"{k}: {v}" for k, v in doc.metadata.items()])
formatted_doc = f"\n---\nContent: {doc.page_content}\nSource Information:\n{metadata_str}\n---"
formatted_docs.append(formatted_doc)
return "\n".join(formatted_docs)- Knowledge Base Q&A: Query company documentation
- Research Assistant: Search through research papers
- Legal Document Analysis: Find relevant clauses and precedents
- Technical Documentation: Get answers from manuals and guides
- Personal Knowledge Management: Query your notes and documents
The project includes beautiful 2D visualizations of the embedding space:
- t-SNE Dimensionality Reduction: 384D vectors β 2D plot
- Interactive Plotly Charts: Hover to see document content
- Color-Coded by Type: Visualize document clustering
- Metadata Display: See source, type, and content preview
Embedding Dimensions:
- HuggingFace
all-MiniLM-L6-v2: 384 dimensions - OpenAI
text-embedding-ada-002: 1536 dimensions
Chunking Strategy:
- Chunk size: 1000 characters
- Overlap: 200 characters
- Preserves context across chunks
Vector Database:
- Chroma DB (open-source)
- SQLite backend
- Persistent storage
- Fast similarity search
Creating a Vector Database:
# Find all documents
document_paths = find_documents("/path/to/documents")
# Load and chunk
documents = load_documents(document_paths)
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
chunks = text_splitter.split_documents(documents)
# Create vector store
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
vectorstore = Chroma.from_documents(
documents=chunks,
embedding=embeddings,
persist_directory="my_vector_db"
)Querying the Database:
# Load existing database
vectorstore = load_or_check_db("my_vector_db")
# Set up retrieval chain
llm = ChatOpenAI(temperature=0.7, model_name="gpt-4o-mini")
retriever = vectorstore.as_retriever()
conversation_chain = ConversationalRetrievalChain.from_llm(
llm=llm,
retriever=retriever,
memory=memory
)
# Query
result = conversation_chain.invoke({"question": "What is quantization?"})
print(result["answer"])Required:
- Python 3.8+
- OpenAI API key (for GPT models) or Anthropic API key (for Claude)
Python Packages:
pip install langchain langchain-openai langchain-anthropic langchain-chroma
pip install sentence-transformers chromadb
pip install pypdf docx2txt chardet
pip install scikit-learn plotly gradio
pip install python-dotenvDocument Support:
- PDF files (via PyPDFLoader)
- DOCX files (via Docx2txtLoader)
- Markdown files (via TextLoader)
Cost-Effective:
- Use free HuggingFace embeddings
- Use budget-friendly GPT-4o-mini
- Local vector database (no cloud costs)
Privacy-First:
- Documents never leave your machine
- Local embedding generation option
- Self-hosted vector database
Production-Ready:
- Conversation memory
- Source attribution
- Error handling
- Gradio web interface
A comprehensive introduction to LangGraph for building stateful, multi-agent AI systems with conditional logic, tool calling, and memory.
This project teaches LangGraph fundamentals through progressive examples:
- Build simple state graphs with conditional edges
- Add reasoning and tool calling capabilities
- Implement persistent memory across conversations
- Visualize graph structures with Mermaid diagrams
6_LangGraph/
βββ 1_SimpleGraph.ipynb # Basic graph structure
βββ 2_SimpleGraph_with_Reasoning_&_Tools.ipynb # Add tools and reasoning
βββ 3_SimpleGraph_with_Reasoning_&_Tools_&_Memory.ipynb # Add memory
βββ requirements.txt # Dependencies
βββ images/
βββ arithmetic.png # Graph visualization
βββ mermaid_image.png # Mermaid diagram
Core Concepts:
- State management with TypedDict
- Node creation and execution
- Conditional edges
- Graph visualization
Example:
class state(TypedDict):
graph_state: str
def node_1(state):
print("---Node 1---")
return {"graph_state": state["graph_state"] + ": 1"}
def decide_next(state) -> Literal["node_2","node_3"]:
if random.random() < 0.5:
return "node_2"
return "node_3"
# Build graph
builder = StateGraph(state)
builder.add_node("node_1", node_1)
builder.add_node("node_2", node_2)
builder.add_node("node_3", node_3)
builder.add_edge(START, "node_1")
builder.add_conditional_edges("node_1", decide_next)
builder.add_edge("node_2", END)
builder.add_edge("node_3", END)
graph = builder.compile()Advanced Concepts:
- Tool binding to LLMs
- ReAct pattern (Reasoning + Acting)
- Arithmetic operations as tools
- Tool condition checking
Arithmetic Agent:
def multiply(a, b):
"""Multiply two numbers"""
return a * b
def add(a, b):
"""Add two numbers"""
return a + b
def divide(a, b):
"""Divide two numbers"""
return a / b
tools = [multiply, add, divide]
llm = ChatOpenAI(model="gpt-4o")
llm_with_tools = llm.bind_tools(tools)
# Define assistant node
def assistant(state: MessagesState):
return {"messages": [llm_with_tools.invoke([system_message] + state["messages"])]}
# Build graph with tools
builder = StateGraph(MessagesState)
builder.add_node("assistant", assistant)
builder.add_node("tools", ToolNode(tools))
builder.add_edge(START, "assistant")
builder.add_conditional_edges("assistant", tools_condition)
builder.add_edge("tools", "assistant")
react_graph = builder.compile()Example Interaction:
User: "What is 2 times 3?"
AI: [Calls multiply tool with a=2, b=3]
Tool: Returns 6
AI: "The result of 2 times 3 is 6."
Memory Features:
- MemorySaver for persistent state
- Thread-based conversations
- Context retention across queries
- Checkpointing
With Memory:
memory = MemorySaver()
thread_id = "1"
config = {"configurable": {"thread_id": thread_id}}
react_graph = builder.compile(checkpointer=memory)
# First query
messages = [HumanMessage(content="What is 2 times 3?")]
result = react_graph.invoke({"messages": messages}, config)
# AI: "2 times 3 is 6"
# Follow-up query (remembers previous context)
messages = [HumanMessage(content="Add 4 to it")]
result = react_graph.invoke({"messages": messages}, config)
# AI: "Adding 4 to 6 gives you 10"Agentic Workflows:
- Multi-step reasoning tasks
- Tool-using agents
- Conditional logic flows
- State machine implementations
Business Applications:
- Customer service bots with context
- Data analysis agents
- Automated workflows
- Decision trees
Research & Development:
- Agent behavior testing
- Prompt engineering experiments
- Tool integration prototypes
- Graph-based AI architectures
LangGraph automatically generates Mermaid diagrams:
# Generate and save graph visualization
mermaid_image = Image(graph.get_graph().draw_mermaid_png())
with open("images/mermaid_image.png", "wb") as f:
f.write(mermaid_image.data)Visualization Shows:
- Nodes (processing steps)
- Edges (transitions)
- Conditional branches
- Start and end points
State Management:
- TypedDict for type safety
- State updates via return values
- Immutable state patterns
Conditional Logic:
- Literal types for type-safe routing
- Dynamic edge selection
- Probabilistic branching
Tool Integration:
- Function binding to LLMs
- Automatic tool calling
- Tool result processing
Memory & Persistence:
- Checkpointing for state recovery
- Thread-based conversations
- Cross-session memory
LangGraph Components:
- StateGraph: Main graph builder
- MessagesState: Built-in state for chat
- ToolNode: Automatic tool execution
- MemorySaver: Persistent state storage
- Conditional Edges: Dynamic routing
Integration with LangChain:
- Uses LangChain tools
- Compatible with LangChain LLMs
- Supports LangChain messages
Required:
- OpenAI API key
- Python 3.8+
Python Packages:
pip install langgraph langchain-openai python-dotenv- Start Simple: Understand state and nodes (Notebook 1)
- Add Intelligence: Learn tool calling (Notebook 2)
- Add Memory: Implement persistence (Notebook 3)
- Build Custom: Create your own agents
ReAct Pattern:
- Reasoning: LLM thinks about what to do
- Acting: LLM calls appropriate tools
- Observation: LLM sees tool results
- Repeat: Continue until answer found
Multi-Agent Systems:
- Multiple specialized agents
- Agent coordination
- Shared state management
- Conditional agent selection
A comprehensive collection of RAG (Retrieval-Augmented Generation) implementations, from basic to advanced, demonstrating best practices and common pitfalls.
This project provides a complete RAG learning path:
- Basic RAG without chunking
- Chunking strategies
- Embedding visualizations
- Complete pipelines with Chroma and FAISS
- Fixing relevancy issues
7_RAG_Solutions/
βββ 1_RAG_Basic.ipynb # Simple RAG
βββ 2_RAG_withChunking.ipynb # Add chunking
βββ 3_RAG_withChunkingEmbeddingsVisualizations.ipynb # Visualize embeddings
βββ 4_1_RAG_CompletePipeline_Chroma.ipynb # Production Chroma
βββ 4_2_RAG_CompletePiepline_FAISS.ipynb # Production FAISS
βββ 5_RAG_FixingCommonIssue_Relevency.ipynb # Improve relevancy
Concepts:
- Simple context retrieval
- Brute-force keyword matching
- Direct context injection
- No vector embeddings
Implementation:
# Simple keyword-based retrieval
def get_relevant_context(message):
relevant_context = []
for context_title, context_details in context.items():
if context_title.lower() in message.lower():
relevant_context.append(context_details)
return relevant_context
# Direct context in prompt
system_message = "You are an expert in answering accurate questions about Insurellm..."
context = get_relevant_context(user_message)
response = openai.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": system_message + "\n" + "\n".join(context)},
{"role": "user", "content": user_message}
]
)Limitations:
- No semantic understanding
- Keyword matching only
- Doesn't scale well
- No similarity ranking
Improvements:
- Document chunking
- Chunk size optimization
- Overlap strategies
- Better context management
Chunking Strategy:
text_splitter = CharacterTextSplitter(
chunk_size=1000, # Characters per chunk
chunk_overlap=200 # Overlap to preserve context
)
chunks = text_splitter.split_documents(documents)Benefits:
- Manageable context sizes
- Better token usage
- Preserved context across boundaries
- Scalable to large documents
Advanced Features:
- Vector embeddings
- Semantic similarity
- t-SNE visualizations
- Embedding space analysis
Visualization:
# Reduce 384D embeddings to 2D
tsne = TSNE(n_components=2, random_state=42)
reduced_vectors = tsne.fit_transform(vectors)
# Plot with Plotly
fig = go.Figure(data=[go.Scatter(
x=reduced_vectors[:, 0],
y=reduced_vectors[:, 1],
mode='markers',
text=[f"Type: {t}<br>Text: {d[:100]}..." for t, d in zip(doc_types, documents)],
hoverinfo='text'
)])Insights:
- See document clustering
- Identify similar content
- Debug embedding quality
- Understand semantic relationships
Production Features:
- Chroma vector database
- Persistent storage
- Efficient retrieval
- Metadata filtering
- Conversational memory
Implementation:
# Create persistent vector store
embeddings = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
vectorstore = Chroma.from_documents(
documents=chunks,
embedding=embeddings,
persist_directory="vector_db"
)
# Set up retrieval chain
llm = ChatOpenAI(temperature=0.7, model_name="gpt-4o-mini")
memory = ConversationBufferMemory(memory_key='chat_history', return_messages=True)
retriever = vectorstore.as_retriever()
conversation_chain = ConversationalRetrievalChain.from_llm(
llm=llm,
retriever=retriever,
memory=memory
)FAISS Advantages:
- Extremely fast similarity search
- Optimized for large-scale
- GPU acceleration support
- Multiple index types
When to Use FAISS:
- Large document collections (>100K documents)
- Need for sub-millisecond search
- GPU available
- Read-heavy workloads
When to Use Chroma:
- Smaller collections
- Need persistence
- Metadata filtering
- Easier setup
Common Problems:
- Irrelevant chunks retrieved
- Missing relevant information
- Poor ranking
- Context window overflow
Solutions:
# 1. Adjust retrieval parameters
retriever = vectorstore.as_retriever(
search_type="similarity",
search_kwargs={"k": 5} # Retrieve top 5 chunks
)
# 2. Use MMR (Maximum Marginal Relevance)
retriever = vectorstore.as_retriever(
search_type="mmr",
search_kwargs={"k": 5, "fetch_k": 20, "lambda_mult": 0.5}
)
# 3. Hybrid search (keyword + semantic)
# 4. Re-ranking with cross-encoder
# 5. Query expansion
# 6. Metadata filteringEnterprise Knowledge Management:
- Company documentation Q&A
- Policy and procedure lookup
- Employee onboarding
- Compliance checking
Customer Support:
- Product documentation search
- Troubleshooting guides
- FAQ automation
- Ticket resolution
Research & Analysis:
- Literature review
- Patent search
- Legal document analysis
- Medical records query
| Feature | Basic RAG | With Chunking | With Embeddings | Complete Pipeline |
|---|---|---|---|---|
| Semantic Search | β | β | β | β |
| Scalability | Low | Medium | High | Very High |
| Accuracy | Low | Medium | High | Very High |
| Setup Complexity | Simple | Simple | Medium | Complex |
| Cost | Very Low | Low | Medium | Medium |
| Best For | Prototypes | Small docs | Medium docs | Production |
Chunking:
- Chunk size: 500-1000 characters
- Overlap: 10-20% of chunk size
- Preserve sentence boundaries
- Consider document structure
Embeddings:
- Use domain-specific models when available
- Cache embeddings for reuse
- Monitor embedding quality
- Consider fine-tuning for specialized domains
Retrieval:
- Start with k=3-5 chunks
- Use MMR to reduce redundancy
- Implement re-ranking for better results
- Add metadata filters for precision
Evaluation:
- Test with diverse queries
- Measure retrieval accuracy
- Monitor response quality
- Track latency and costs
Required:
- OpenAI API key
- Python 3.8+
Python Packages:
pip install langchain langchain-openai langchain-chroma
pip install sentence-transformers chromadb faiss-cpu
pip install pypdf docx2txt
pip install scikit-learn plotly gradio
pip install python-dotenv- Start Simple: Basic RAG for prototyping
- Add Chunking: Essential for scalability
- Use Embeddings: Semantic search is crucial
- Choose Vector DB: Chroma for ease, FAISS for scale
- Optimize Relevancy: Tune retrieval parameters
- Monitor Quality: Continuous evaluation
A sophisticated multi-agent system that automatically researches news topics, analyzes articles, and generates comprehensive reports with source attribution.
This project demonstrates advanced agentic AI patterns:
- Multi-agent coordination
- NewsAPI integration
- Automated article ranking
- Sentiment and bias analysis
- Comprehensive report generation
- Markdown output with citations
8_News_Research_Assistant/
βββ runme.py # Main entry point
βββ news_research_coordinator_light.py # Orchestration logic
βββ config.py # Configuration
βββ agents/
β βββ __init__.py
β βββ base_agent.py # Base agent class
β βββ search_agent.py # Article search
β βββ analysis_agent.py # Content analysis
β βββ report_agent.py # Report generation
βββ reports/ # Generated reports
βββ requirements.txt
1. Search Agent
- NewsAPI Integration: Fetches articles by topic and date range
- GPT-Powered Ranking: Uses LLM to evaluate article relevance
- Source Evaluation: Assesses credibility and quality
- Smart Filtering: Returns only the most relevant articles
class SearchAgent(BaseAgent):
async def process(self, query: Dict[str, str]) -> List[Dict]:
# Fetch articles from NewsAPI
raw_articles = await self._fetch_articles(query)
# Use GPT to rank by relevance
ranked_articles = await self._rank_articles(raw_articles, query['topic'])
return ranked_articles[:MAX_ARTICLES_PER_SEARCH]2. Analysis Agent
- Article Summarization: Concise summaries of each article
- Key Point Extraction: Identifies main takeaways
- Sentiment Analysis: Scores sentiment (-1 to 1)
- Topic Identification: Extracts main themes
- Bias Detection: Identifies potential biases
- Overall Analysis: Synthesizes findings across articles
class AnalysisAgent(BaseAgent):
async def process(self, articles: List[Dict]) -> Dict:
results = {
'summaries': [],
'key_points': [],
'sentiment': [],
'topics': [],
'biases': []
}
# Analyze each article
for article in articles:
analysis = await self._analyze_article(article)
results['summaries'].append(analysis['summary'])
# ... collect other metrics
# Perform overall analysis
results['overall_analysis'] = await self._perform_overall_analysis(results)
return results3. Report Agent
- Executive Summary: High-level findings
- Detailed Analysis: In-depth topic and source analysis
- Recommendations: Actionable insights
- Source Attribution: Full citation tracking
- Markdown Formatting: Professional output
class NewsResearchCoordinatorLight:
async def research_topic(self, topic: str, time_range: Dict[str, str] = None) -> Dict:
# Step 1: Search for articles
articles = await self.search_agent.process({
'topic': topic,
'time_range': time_range
})
# Step 2: Analyze articles
analysis_results = await self.analysis_agent.process(articles)
# Step 3: Generate report
report_data = {
'topic': topic,
'timestamp': datetime.now().isoformat(),
'articles': articles,
'analysis': analysis_results
}
final_report = await self.report_agent.process(report_data)
# Format and save
markdown_content = self._format_report_markdown(final_report, topic)
filename = self._save_report(markdown_content, topic)
return final_reportBusiness Intelligence:
- Competitive analysis
- Market trend monitoring
- Industry news tracking
- Brand sentiment analysis
Research:
- Literature review automation
- Topic exploration
- Source credibility assessment
- Trend identification
Journalism:
- Story research
- Source gathering
- Fact-checking
- Bias detection
Investment:
- Market sentiment analysis
- Company news monitoring
- Industry trend tracking
- Risk assessment
Generated Report Includes:
-
Executive Summary
- Main findings
- Key trends
- Critical insights
- Reliability assessment
-
Detailed Analysis
- Topic analysis (main topics, relationships, emerging themes)
- Source analysis (distribution, credibility, biases)
- Sentiment overview
- Conflicting viewpoints
-
Recommendations
- Prioritized action items
- Rationale for each recommendation
- Implementation considerations
-
Source Citations
- Full article references
- Publication dates
- Source credibility notes
Async/Await Pattern:
async def main():
coordinator = NewsResearchCoordinatorLight()
report = await coordinator.research_topic(
topic="Artificial Intelligence Ethics",
time_range={'start': '2025-05-17', 'end': '2025-05-19'}
)Progress Tracking:
# Visual progress bars for each stage
search_pbar = tqdm(total=1, desc="π Searching for articles", position=0)
analysis_pbar = tqdm(total=1, desc="π Analyzing articles", position=1)
report_pbar = tqdm(total=1, desc="π Generating final report", position=2)Error Handling:
- Graceful degradation
- Default values for failed analyses
- Comprehensive error logging
- Retry logic for API calls
Basic Usage:
import asyncio
from news_research_coordinator_light import NewsResearchCoordinatorLight
async def main():
coordinator = NewsResearchCoordinatorLight()
report = await coordinator.research_topic(
topic="Climate Change Technology",
time_range={
'start': '2025-01-01',
'end': '2025-01-31'
}
)
print(f"Report saved to: {report['filename']}")
if __name__ == "__main__":
asyncio.run(main())Custom Configuration:
# config.py
MAX_ARTICLES_PER_SEARCH = 10
OPENAI_MODEL = "gpt-4o-mini"
NEWS_API_KEY = "your-key-here"
SEARCH_AGENT_PROMPT = "You are an expert news curator..."
ANALYSIS_AGENT_PROMPT = "You are an expert content analyst..."
REPORT_AGENT_PROMPT = "You are an expert research report writer..."Required:
- OpenAI API key
- NewsAPI key (free tier available at newsapi.org)
- Python 3.8+
Python Packages:
pip install openai newsapi-python python-dotenv tqdm asyncioEnvironment Variables:
OPENAI_API_KEY=your-openai-key
NEWS_API_KEY=your-newsapi-keyIntelligent Article Ranking:
- GPT evaluates relevance, credibility, and quality
- Scores articles on multiple dimensions
- Filters out low-quality sources
Comprehensive Analysis:
- Multi-dimensional article evaluation
- Cross-article synthesis
- Bias and sentiment tracking
- Topic clustering
Professional Output:
- Markdown formatted reports
- Automatic file naming with timestamps
- Source attribution
- Executive summaries
Scalable Architecture:
- Async/await for performance
- Modular agent design
- Easy to extend with new agents
- Configurable parameters
JSON Response Parsing:
async def _parse_json_response(self, response: str, default_value: Any) -> Any:
"""Safely parse JSON from LLM response with fallback."""
try:
# Try to extract JSON from markdown code blocks
if "```json" in response:
json_str = response.split("```json")[1].split("```")[0].strip()
else:
json_str = response.strip()
return json.loads(json_str)
except Exception as e:
print(f"Error parsing JSON: {str(e)}")
return default_valueProgress Visualization:
- Real-time progress bars
- Stage-by-stage updates
- Article-by-article tracking
- Time estimates
Report Persistence:
- Automatic report saving
- Organized file structure
- Timestamp-based naming
- Markdown format for easy sharing
NewsAPI:
- Free tier: 100 requests/day
- Developer tier: $449/month (unlimited)
OpenAI:
- GPT-4o-mini: ~$0.15 per report (typical)
- GPT-4o: ~$1.50 per report (higher quality)
Optimization Tips:
- Use GPT-4o-mini for cost savings
- Limit articles per search
- Cache article analyses
- Batch API calls
Potential Additions:
- Web scraping for full article content
- Multi-language support
- Custom source lists
- Historical trend analysis
- Interactive web UI
- Email report delivery
- Scheduled automated research
- Clone the repository:
git clone <repository-url>
cd LLM_Engineering_Projects- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
For Scraper Summarizer:
pip install requests beautifulsoup4 openai python-dotenv ipythonFor Ollama support:
pip install ollama
# Install Ollama from https://ollama.com
ollama pull llama3.2For Synthetic Data Generator (Version 1):
pip install transformers torch bitsandbytes gradio huggingface_hubFor Synthetic Data Generator (Version 2):
pip install openai anthropic gradio pandas numpy python-dotenvFor Code Generator (Project 3):
pip install openai anthropic gradio huggingface_hub transformers python-dotenvFor Python to C++ Converter (Project 4):
pip install openai anthropic gradio python-dotenvFor Local RAG Assistant (Project 5):
pip install langchain langchain-openai langchain-anthropic langchain-chroma
pip install sentence-transformers chromadb pypdf docx2txt chardet
pip install scikit-learn plotly gradio python-dotenvFor LangGraph (Project 6):
pip install langgraph langchain-openai python-dotenvFor RAG Solutions (Project 7):
pip install langchain langchain-openai langchain-chroma
pip install sentence-transformers chromadb faiss-cpu
pip install pypdf docx2txt scikit-learn plotly gradio python-dotenvFor News Research Assistant (Project 8):
pip install openai newsapi-python python-dotenv tqdm asyncioC++ Compiler Installation:
macOS:
xcode-select --installLinux (Ubuntu/Debian):
sudo apt update
sudo apt install g++ clangWindows:
- Download and install Visual Studio Community 2022
- Select "Desktop development with C++" workload
- Set up environment variables:
Create a .env file in the project root:
# For OpenAI projects
OPENAI_API_KEY=sk-proj-your-key-here
# For Anthropic/Claude projects
ANTHROPIC_API_KEY=your-key-here
# For HuggingFace projects
HF_TOKEN=your-token-here
# For News Research Assistant (Project 8)
NEWS_API_KEY=your-newsapi-key-hereJupyter Notebooks:
jupyter notebook
# Navigate to the desired project folder and open the notebookGradio Interfaces:
- Run the cells in the notebook until you reach the
ui.launch()cell - The interface will open automatically in your browser
- Default URL:
http://127.0.0.1:7860
- Python 3.8+
- Jupyter Notebook or JupyterLab
- Internet connection (for cloud models)
- OpenAI: For GPT models (Projects 1-8)
- Anthropic: For Claude models (Projects 1-5, optional)
- HuggingFace: For open-source models (Projects 2-3, optional)
- NewsAPI: For news article search (Project 8, free tier available)
Minimum:
- 8GB RAM
- Dual-core processor
- 10GB free disk space
- C++ compiler (for Projects 3 & 4)
Recommended for Local Models:
- 16GB+ RAM
- GPU with 8GB+ VRAM (for HuggingFace models)
- 50GB+ free disk space (for multiple models)
Recommended for C++ Compilation:
- Quad-core processor
- 16GB RAM
- SSD for faster compilation
For RAG Projects (5 & 7):
- 8GB+ RAM (for vector databases)
- 5GB+ free disk space (for embeddings and databases)
- SSD recommended for faster retrieval
- Ensure API key starts with
sk-proj- - Check for whitespace in
.envfile - Verify API key has sufficient credits
- Confirm Ollama is running: visit
http://localhost:11434 - Start server:
ollama serve - Pull models:
ollama pull llama3.2
- Authenticate:
huggingface-cli login - Accept model licenses on HuggingFace website
- Ensure sufficient disk space for model downloads
- Use smaller models (e.g.,
llama3.2:1b) - Enable 4-bit quantization
- Reduce batch sizes
- Close other applications
- macOS: Ensure Xcode Command Line Tools installed
- Linux: Install build-essential:
sudo apt install build-essential - Windows: Verify Visual Studio C++ tools are installed
- Check compiler path is in system PATH
- Try compiling simple test program first
- Verify endpoint is running (not paused)
- Check endpoint URL is correct
- Ensure HF_TOKEN is valid
- Monitor endpoint logs for errors
- Remember to pause endpoints when not in use to avoid charges
- Chroma DB: Ensure persist_directory has write permissions
- FAISS: May require
faiss-gpufor GPU support - Embeddings: First run downloads models (~500MB)
- Memory: Large document collections may require more RAM
- Clear old databases if encountering corruption
- Ensure
langgraphandlangchain-openaiversions are compatible - Check that state TypedDict matches node return types
- Verify conditional edge return types match Literal types
- Use
graph.get_graph().draw_mermaid_png()to debug structure
- NewsAPI: Free tier limited to 100 requests/day
- Rate Limits: Add delays between API calls if hitting limits
- Async Issues: Ensure using
asyncio.run()for async functions - JSON Parsing: LLM responses may need retry logic
These projects demonstrate key LLM engineering concepts:
- Prompt Engineering: System and user prompts
- API Integration: Multiple LLM providers (OpenAI, Anthropic, HuggingFace)
- Web Scraping: Practical data extraction
- Streaming Responses: Real-time output generation
- Code Generation: LLM-generated executable code
- Code Execution: Running generated code safely
- Model Quantization: Efficient model deployment
- Model Deployment: Production deployment with HuggingFace
- Agentic Patterns: Multi-step LLM workflows and multi-agent systems
- RAG (Retrieval-Augmented Generation): Vector databases and semantic search
- Vector Embeddings: Document embeddings and similarity search
- LangGraph: Stateful graph-based agent workflows
- LangChain: Chains, memory, and retrieval
- Performance Optimization: Python to C++ conversion
- Cross-Platform Development: Multi-OS compiler support
- Interactive UIs: Gradio web interfaces
- Async Programming: Concurrent API calls and processing
- Data Visualization: t-SNE, Plotly, and embedding visualizations
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
This project is provided for educational purposes. Please ensure compliance with:
- OpenAI's Terms of Service
- Anthropic's Terms of Service
- HuggingFace's Terms of Service
- Website scraping policies and robots.txt
- OpenAI for GPT models and embeddings
- Anthropic for Claude models
- Meta for Llama models
- DeepSeek for reasoning models
- HuggingFace for model hosting, inference endpoints, and sentence transformers
- Ollama for local model serving
- Qwen team for CodeQwen models
- Google for CodeGemma models
- Gradio for the UI framework
- LangChain for the orchestration framework
- LangGraph for stateful agent workflows
- Chroma for vector database
- FAISS (Facebook AI) for similarity search
- NewsAPI for news article access
- Sentence Transformers for embedding models
Happy Building! π