# Building a RAG application with Llama 3.1 and pgvector

DevFeed: [Building a RAG application with Llama 3.1 and pgvector](<https://devfeed.tech/articles/building-a-rag-application-with-llama-3-1-and-pgvector-5093.md>)

Original publisher: [Read original article](<https://neon.com/blog/building-a-rag-application-with-llama-3-1-and-pgvector>)

Author: Andrew Tate

Published: 2024-07-30T16:58:41Z

Content type: tutorial

Language: en

Sources: [Blog -- Neon Docs](<https://devfeed.tech/sources/blog-neon-docs.md>)

Topics: [Retrieval Augmented Generation (RAG)](<https://devfeed.tech/topics/retrieval-augmented-generation-rag.md>), [llama](<https://devfeed.tech/topics/llama.md>), [Embeddings](<https://devfeed.tech/topics/embeddings.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Open Source Models & Datasets](<https://devfeed.tech/topics/open-source-models-datasets.md>), [Meta](<https://devfeed.tech/topics/meta.md>), [Natural language processing](<https://devfeed.tech/topics/nlp.md>), [OpenAI](<https://devfeed.tech/topics/openai.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [database](<https://devfeed.tech/tags/database.md>), [embeddings](<https://devfeed.tech/tags/embeddings.md>), [large-language-models-llms](<https://devfeed.tech/tags/large-language-models-llms.md>), [llama](<https://devfeed.tech/tags/llama.md>), [meta](<https://devfeed.tech/tags/meta.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [openai](<https://devfeed.tech/tags/openai.md>), [pgvector](<https://devfeed.tech/tags/pgvector.md>), [product](<https://devfeed.tech/tags/product.md>), [rag](<https://devfeed.tech/tags/rag.md>)

## AI overview

A tutorial on building a Retrieval-Augmented Generation application with Meta's Llama 3.1 and pgvector. It explains how retrieval and embeddings let an LLM use relevant, up-to-date information from an external knowledge base.

## Source excerpt

The AI wars have begun. Not the one where the machines enslave us and use our body heat to power their compute-that's at least 18 months off. 🙂 No, this AI war is between the tech giants and between closed, proprietary models and open source. In one corner, we have OpenAI, suppo...