Ai Web Agent Rag
Description
An advanced Artificial Intelligence (AI) example of a Retrieval-Augmented Generation (RAG) Next.js web app with agents (tools)
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Advanced Retrieval-Augmented Generation (RAG) web app
This advanced Retrieval-Augmented Generation (RAG) web app is based on the [LlamaIndex](https://www.llamaindex.ai/) project using [Next.js](https://nextjs.org/) bootstrapped with [create-llama](https://www.npmjs.com/package/create-llama).
You might therefore have to install [Node.js](https://nodejs.org/en) first.
The front-end is a Next.js (React) TypeScript (JavaScript) web app.
This web app also contains two different types of agents (tools).
The first one is the [Wikipedia tool](https://llamahub.ai/l/tools/llama-index-tools-wikipedia) provided by LlamaIndex.
The second one is a custom FunctionTool in the `chat.ts` file. This custom function writes the first name in lower case letters and the last name in upper case letters. This is in itself not very useful, but you can easily change it to any functionality you like. You just have to change the custom function and the JSON (parameter) description of the custom function accordingly.
First, install the dependencies:
npm install
You will need to supply your own OpenAI API key. You can supply your OpenAI API key either via the `.env` file, or through an environment variable called `OPENAI_API_KEY`. If you don't want to use OpenAI, then you can change the web app to use any of the Large Language Models (LLMs) that LlamaIndex supports, including local models.
[Pinecone](https://www.pinecone.io/) is used as Vector Store (database). You can use a free Pinecone pod-based index of the "Chatbot" type. You can give your index any name you like. If you use the GPT-3.5 Large Language Model, then you will have to set the configuration to "text-embedding-ada-002" ("1536" dimension and "cosine" metric). You will then have to supply these 3 settings either through environment variables, or via the `.env` file like this:
PINECONE_API_KEY=
PINECONE_ENVIRONMENT=https://.pinec
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI