# RAG With Autoscaling: Better Performance With Lower Costs For pgvector

DevFeed: [RAG With Autoscaling: Better Performance With Lower Costs For pgvector](<https://devfeed.tech/articles/rag-with-autoscaling-better-performance-with-lower-costs-for-pgvector-5760.md>)

Original publisher: [Read original article](<https://neon.com/blog/rag-with-autoscaling>)

Author: Raouf Chebri

Published: 2024-08-27T15:17:26Z

Content type: article

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>), [AI search](<https://devfeed.tech/topics/ai-search.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [AI, ML & Data Engineering](<https://devfeed.tech/topics/ai-ml-data-engineering.md>), [Language models](<https://devfeed.tech/topics/language-models.md>)

Tags: [autoscaling](<https://devfeed.tech/tags/autoscaling.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [database](<https://devfeed.tech/tags/database.md>), [memory](<https://devfeed.tech/tags/memory.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [product](<https://devfeed.tech/tags/product.md>), [rag](<https://devfeed.tech/tags/rag.md>), [retrieval-augmented-generation-rag](<https://devfeed.tech/tags/retrieval-augmented-generation-rag.md>), [search](<https://devfeed.tech/tags/search.md>), [vector](<https://devfeed.tech/tags/vector.md>)

## AI overview

The article explains how Neon autoscaling can temporarily add CPU and memory capacity for pgvector HNSW index builds, reducing the cost of supporting fast vector similarity search for RAG applications.

## Source excerpt

Neon's autoscaling, now GA and available in all pricing plans, enables Postgres instances to dynamically scale up for the high memory and CPU demands of HNSW index builds, avoiding constant overprovisioning. With memory extension through disk swaps, Neon efficiently handles large...