Tuesday, June 2, 2026

LLM Pipelines

We can incoporate 3 ways of LLM through pipelines:

1) DAG workflow
a) Pre designed prompts + code paths
b) Modular components [Yes or No prompts]
2) Agents
LLM setups to make their own decision
3) Agentic workflows
Hybrid architecture


We can create a work flow through LangChain and LangGraph.

LangChain:
It is designed for LLMs. It can be useful for custom workflows, tool integration and agent collaboration. 
LangGraph:
LangGraph library used for build a stateful, multi actors with LLMs

LangGraph concepts:
State: a TypeDict that flow through graph and updated by each nodes.
Nodes : Python function used to receive update and return updates
Edges : Connection between Nodes
Reducter : control how state updates combine with over write or accumalation


Retrieval Augmented Generation (RAG)
A RAG is an interactive system (chatbot) that combined a retrieval (static content) with a dynamic conversation generator.

Components of RAG:
An index : A mechanism to convert a raw data into Vector database
A retriever: Closed tied to the index and retrieve a data from database based on query
A generator : an LLM to reason a through user query and the retrieval knowledge to provide an inline conversational response.

Sementic search:
A system has understand of context and meaning of user query and matches against the available document for retrieval. It can find relevant document without having to rely on exact words or n-gram matching. It often uses a pre-trained large language model to understand the nuance of the query and the documents.
We often use of cosine similarity to define a raw data that produce in vector database.
Cosine is bounded between 1 and -1.
smaller angle == Cosine [up]
larger angle == Cosine [down]
Perpendicular == Cosine 0





No comments:

Post a Comment