Sitemap
Naveen

Naveen

LLMs & Frameworks

5 min readJun 30, 2025

--

“There’s a lot to learn in the world of LLMs and their associated frameworks, especially with how rapidly things evolve. This blog aims to give you a starting point on your journey into Generative AI.”

Large Language Models

  • These are the raw models that do the text understanding/generation
Press enter or click to view image in full size

Frameworks

  • Using models above, we can use below frameworks to build apps
Press enter or click to view image in full size

Platform/Model Hosts

  • These hosts APIs required to connect to LLMs
Press enter or click to view image in full size

How do they work together ?

  • Lets see how all these come together
Press enter or click to view image in full size

When to use what ?

Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size

Open source LLMs

Press enter or click to view image in full size

Closed/Proprietary LLMs

Press enter or click to view image in full size

Analogy — Lets look at couple of examples to understand how all these come together.

Scenario 1:- LLM Powered Restaurant assistant

— LLaMA, GPT, Mistral, etc. = The Chef (LLM Model)

  • These are raw intelligence.
  • They know how to respond to prompts like “cook pasta” or “summarize this text.”
  • They don’t know your kitchen, menu, or rules yet.
  • Example: LLaMA 3 is a great chef, but needs instructions.

“Just give me the brain that can understand and talk.”

— LangChain = The Kitchen Manager / Workflow Planner (Framework)

  • Organizes the chef’s work:
  • Fetches recipes from the database (tool).
  • Sends orders to the chef (LLM).
  • Logs steps.
  • Decides what to do based on user questions.
  • Adds memory, tool use, chaining, retries, etc.

“Here’s how our assistant uses the chef + fridge + recipes to make a dish.”

— LlamaIndex = The Recipe Librarian (Data Indexing Framework)

  • Knows how to organize and query your documents (PDFs, DBs, websites).
  • When the user asks something like “What’s the allergen policy?”, LlamaIndex:
  • Retrieves relevant docs.
  • Feeds them to the chef via LangChain.
  • Thinks in terms of retrieval-augmented generation (RAG).

“Let me look through our 500-page handbook and give you the most relevant info.”

— Hugging Face = Supermarket + Chef Rental (Platform + Hub)

  • Lets you get the chef (LLMs like LLaMA, Mistral, Falcon).
  • Lets you run models in the cloud (via Inference API or Spaces).
  • You can also download tools, datasets, and pipelines.

“Go here to hire a chef, get kitchen tools, or download ingredients.”

Get Naveen’s stories in your inbox

Join Medium for free to get updates from this writer.

— OpenAI API = Luxury Chef on Demand

  • Provides very smart chefs (GPT-4) via an API.
  • You don’t download the chef — just send requests like “make soup.”
  • High quality, paid access.

“UberEats but for high-end chef brains.”

— Ollama = Local Kitchen (Run Chefs on Your Laptop)

  • Lets you run open models like LLaMA or Mistral locally.
  • Great if you want privacy or offline capability.

“Set up your own kitchen and hire your own open-source chef to stay with you.”

— LangGraph, AutoGen = Executive Kitchen Team (Multi-Agent Frameworks)

  • Enable multiple agents working together
  • Planner agent, researcher agent, summarizer agent
  • Track long-term memory, message passing, retries

“Head chef managing pastry chef, sous-chef, and servers.”

Scenario 2:- LLM Powered Travel assistant

I want to get things to do near Raleigh next week”

You want to ask your AI travel assistant this, and get relevant events, places, or recommendations.

Press enter or click to view image in full size

— The Concierge (LLM)

Understands your request.

  • Figures out:
  • “Raleigh” = city
  • “next week” = date range (July 1–7)
  • “things to do” = fetch local events, attractions

“Sure! Let me check events and attractions in Boston next week.”

— The Library (LlamaIndex)

Concierge consults the guidebooks and local listings (your PDFs, websites, event APIs).

  • Looks up: Ticketmaster, RSS feeds, City tourism websites

“Let me check the events database for your dates…”

— The Manager (LangChain)

Behind the scenes, LangChain is telling the concierge:

  • When to use tools
  • How to plan the steps
  • Whether to retry if something fails

“If the user’s location is missing, ask again. If there’s no event data, fall back to general attractions.”

— The Agency (OpenAI or Hugging Face)

If your hotel doesn’t have a concierge, it calls in one remotely:

  • Uses OpenAI API (like hiring GPT-4 remotely)
  • Or Hugging Face API (uses Mistral remotely)
  • Or Ollama (runs one locally on your own server)

🛜 “Calling GPT-4 from the cloud…Or running Mistral on your laptop via Ollama”

— The Team (LangGraph / AutoGen)

For a complex request like:

“Plan a 3-day Boston trip, prioritize museums, but only outdoor stuff if it rains…”

You’d want:

  • A planner agent
  • A weather checker
  • A tour recommender

LangGraph handles that — like coordinating multiple hotel staff members to fulfill one complicated guest request.

Press enter or click to view image in full size
Press enter or click to view image in full size

“Happy learning! There’s so much to explore and experiment with in the world of Generative AI — just like the early days of HTML. Looking forward to seeing many great implementations ahead.”

--

--