RestAI: An Open Source AIaaS Platform Using LlamaIndex, Ollama, and HF Pipelines

RestAI: An Open Source AIaaS Platform Using LlamaIndex, Ollama, and HF Pipelines

Project Introduction Project: There are various types of agents (projects), each with its own functionality. (rag, ragsql, inference, vision) User: Users represent the system’s users. It is used for authentication and authorization (basic authentication). Each user can access multiple projects. LLMs: Supports any public or local LLM supported by LlamaIndex or Ollama. VRAM: Automatic VRAM … Read more

Implementing Agent Applications with LlamaIndex’s Query Pipeline

Implementing Agent Applications with LlamaIndex's Query Pipeline

In the previous article “The Future of Application Orchestration is Pipeline, LlamaIndex Releases Query Pipeline in Preview to Enhance Application Development Flexibility” we mentioned that LlamaIndex has released a new experimental feature that supports defining a Query Pipeline in a declarative manner to create personalized application workflows, along with a case study for RAG applications. … Read more

Using LlamaIndex to Create Custom Agent Functions

Using LlamaIndex to Create Custom Agent Functions

Overview This article introduces how to use LlamaIndex to write your own Agent handling functions. Note that this article uses a locally deployed LLM supported by Ollama for practical implementation, rather than remotely calling the OpenAI API. The goal of this article is to save the output content to a PDF file and then stop … Read more

LlamaIndex Practical Guide – Overview of Query Engine Usage

LlamaIndex Practical Guide - Overview of Query Engine Usage

Overview The Query Engine is a generic interface that allows you to query data. It accepts natural language queries and returns rich responses. It is typically (but not always) built on one or more indexes through a retriever. You can combine multiple query engines to achieve more advanced functionality. Note: If you want to have … Read more

Prompt Engineering in LlamaIndex

Prompt Engineering in LlamaIndex

Prompt is the fundamental input that grants LLM expressive capabilities. LlamaIndex uses prompts to build indexes, execute inserts, retrieve during queries, and synthesize final answers. LlamaIndex provides a set of out-of-the-box default prompt templates: https://github.com/run-llama/llama_index/blob/main/llama-index-core/llama_index/core/prompts/default_prompts.py Additionally, here are some prompts specifically written for chat models like gpt-3.5-turbo: https://github.com/run-llama/llama_index/blob/main/llama-index-core/llama_index/core/prompts/chat_prompts.py Custom Prompts Users can also provide their … Read more

LlamaIndex Practical Implementation: Agent Database Interaction

LlamaIndex Practical Implementation: Agent Database Interaction

Overview This article implements a simple intelligent Agent that first queries data from a database and then processes the data using utility functions. This is a very common scenario that can be extended to multiple practical situations. Similarly, all experiments in this article are conducted on a local machine with 16C32G Linux (CPU). Data Preparation … Read more

Using LlamaIndex Agent to Call Multiple Tool Functions

Using LlamaIndex Agent to Call Multiple Tool Functions

Overview This article introduces how to use LlamaIndex’s Agent to call multiple custom Agent tool functions. As with the previous articles in this series, this article does not use the OpenAI API and relies entirely on a local large model to complete the entire functionality. The goal of this article is simple: to save the … Read more

How LlamaIndex Performs Retrieval Augmented Generation (RAG)

How LlamaIndex Performs Retrieval Augmented Generation (RAG)

The full name of RAG is Retrieval Augmented Generation, which means “retrieval enhanced generation”. LLMs are trained on a vast amount of data, but this training data does not include your data. RAG solves this problem by adding your data to the data that the LLM already has access to. In RAG, your data is … Read more

Embedding Models in LlamaIndex

Embedding Models in LlamaIndex

You may have heard of the concept of word embedding, which represents semantics using numerical vectors. The closer the numerical vectors are, the more similar the corresponding statements or words are in meaning. LlamaIndex also uses embeddings to represent documents. The embedding model takes text as input and returns a long string of numbers that … Read more

Implementing RAG Queries in LlamaIndex Agent

Implementing RAG Queries in LlamaIndex Agent

Implementing RAG Queries in LlamaIndex Agent Overview This article explains how to integrate a RAG query engine into an Agent, enabling the Agent to utilize external knowledge bases for data queries, thus enhancing its capabilities. This approach is useful in many scenarios, for instance: often we need to query or compute a specific metric first, … Read more