text
stringlengths
0
59.1k
- **Creation of Embeddings:** The text is transformed into a numeric vector, which semantically interprets it with the help of an embedding model, itself an LLM.
- **Stored in Vector Database:** These vectors and the pieces of text itself are stored inside the vector database.
- **When a User Query Comes In:** - The user's question is also passed through the same embedding model, and a query vector is created.
This question vector is compared against the other vectors stored in the database. The words in the text that are semantically closest-that is, most relevant to the question-are located. These relevant pieces, combined with the user's original question, are input into an LLM as a "prompt."
The LLM utilizes the question and this additional information to create far more precise, contextually appropriate responses to your data.
> _When I first implemented RAG and had an LLM talk to my own notes, I was just blown away. It felt like the LLM became an extension of my brain!_
5. Callbacks & Logging: What's Going On Behind the Scenes?
As the flows of orchestrations become more complex, questions like "What step are we on now?", "What was the LLM response?", "What tool did we use?" matter a great deal. Callbacks and logging enable you to trace this process, debug issues, and examine performance. Frameworks like LangChain have this built in.
:::danger Warning!
If you don't log a complex orchestration flow, finding the problem when something goes wrong is like looking for a needle in a haystack. Setting up a good logging strategy from the start is _very important_. Trust me on this!
:::
:::tip A Quick Analogy
Think of an LLM as a super-smart intern. They can write, summarize, and even code a bit. But to tackle a big project, they need a manager (the orchestrator) to break down tasks, provide the right documents (tools/RAG), help them remember past conversations (memory), and ensure their final work is polished and useful (p...
:::
### Dive Deeper: Key Orchestration Concepts in Action
Think of it like this: your LLM is a brilliant chef (GPT-4, Claude, etc.), but it only knows how to cook what's in its recipe book (its training data). If you ask for a dish using ingredients it hasn't seen (recent news, your company's private data), it might struggle or make something up.
RAG is like giving that chef a tablet connected to a massive, constantly updated grocery database and your personal pantry list. Here's a simplified flow:
1. **You Ask a Question:** "What were our Q3 sales figures for Product X based on the latest internal report?"
2. **Retrieve Relevant Information:** The LLM retrieves relevant information from the database or external sources.
3. **Generate Response:** The LLM uses the retrieved information to generate a response.
4. **Output:** The response is presented to the user.
## What's Out There? Popular LLM Orchestration Framework
When it comes to bringing LLM orchestration to life, developers have several powerful frameworks and tools at their disposal. These tools aim to simplify the complexities of building, managing, and monitoring sophisticated AI applications. Popular open-source frameworks like **LangChain** and **LlamaIndex** provide com...
Alongside these established players, other specialized tools and frameworks continue to emerge, each offering unique strengths. For developers particularly focused on TypeScript and seeking strong built-in observability from the ground up, **VoltAgent** presents a compelling option.
**VoltAgent: A TypeScript Framework with a Keen Eye on Observability**
VoltAgent is an open-source TypeScript framework specifically designed for building and orchestrating AI agents and LLM applications. It provides developers with the tools to create sophisticated workflows where LLMs can interact with various data sources, external APIs, and other services. A key focus for VoltAgent is...
If you're looking for a modern, TypeScript-first approach to LLM orchestration with built-in visual debugging and tracing, VoltAgent is definitely worth exploring. You can find its [documentation here](https://voltagent.dev/docs/quick-start) and the [project on GitHub](https://github.com/VoltAgent/voltagent).
### Getting Your Hands Dirty: Tips for Starting with LLM Orchestration
Alright, theory is great, but how do you actually _start_ building with these concepts? It might seem daunting, but here are a few practical tips:
1. **Get a Strong Foundation:**
- **How Do LLMs Work?** It's very useful to know, at a basic level, what LLMs are, how they are trained, and what "prompt engineering" means. Explore the question, "How do I get the answer I want from an LLM?"
- **Python (or JavaScript):** Orchestration frameworks that are super popular nowadays, such as LangChain, are usually based on Python or JavaScript. Familiarity with at least one of them will make your life much easier. Python seems to be ahead of other languages in this field regarding community support and library d...
2. **Find a Problem to Solve (Or Make One Up!):**
It often makes more sense to begin with a practical problem than to get mired in theory. A question might be: "Could I automate this annoying X task with LLMs and orchestration?" or "What if I made my own personal Y assistant?"
- _My first project was simple: an agent that would fetch new articles on my favorite blogs, summarize them for me, and rank them according to my interests. It wasn't that complicated, but it was enough to send me on a path of discovery of basic concepts!_
3. **Select an Orchestration Framework and Start Tinkering:**
- LangChain, which we mentioned earlier, is overall an excellent starting point for newcomers; their documentation is quite extensive, and they have numerous pre-written examples (cookbooks).
- Installation: Go ahead and install the selected framework: in most cases, you begin with something such as: `pip install langchain.`.
Write Your "Hello World": Create a chain that makes a very simple LLM call. Then gradually add a tool to it, get acquainted with a memory module.
4. **Proceed Step by Step, Start Simple:**
- Don't try to build the most complex agent or the largest RAG system right away. First:
- Create a simple **chain**: Ask the LLM a question, get its answer. - Add a **tool**: Make the LLM use a calculator or search the web. - Add **memory**: Make a chatbot that remembers the conversation history.
- **Try RAG on your own data**: Upload a small text file through a tool like LlamaIndex and ask the LLM questions about this file.
- _Every small success will motivate you to take the next step. I also got confused at first by trying to do everything at once, but then things got easier when I said, "Hold on, let me just get this one step done first."_
5. **Review lots of sample code and watch tutorials**
- The official documentation for tools like LangChain and LlamaIndex is worth its weight in gold. They contain hundreds of sample codes and use cases.
- You can find countless tutorials and guides on those topics on YouTube, Medium, and any number of blogs. Searching for something like "LangChain tutorial for beginners" suffices.
- Look at open-source projects on GitHub. How others use these tools is highly instructive.
6. **Be Patient and Have Fun!** Building with LLMs and orchestration is an evolving field. There will be trial and error. Embrace the learning process, celebrate small wins, and don't be afraid to experiment. The AI landscape is moving fast, and being hands-on is the best way to keep up.
<OrchestrationStarterKitAdvisor />
## Wrapping It All Up: The Future is Orchestrated
Yes, dear friends, we have started our journey into this exciting world called LLM orchestration. We found that it is not only a collection of cool technical terms but actually one of the keys to artificial intelligence becoming smarter, more capable, and useful in every area of life.
Now it is your turn. _What are you going to do with this knowledge? What problem are you going to sweat and grind to solve?_ Probably you will begin with a tiny hobby, or maybe you will lay the foundation for the next big startup. Whatever happens, do not stop learning, trying, and, above all, dreaming.
<|endoftext|>
# source: VoltAgent__voltagent/website/blog/2025-04-27-building-voltagent/index.md type: docs