---
title: "Discussion on \"Optimize RAG with Contextual Retrieval in PostgreSQL\" | Hashnode"
description: "Discussion on \"Optimize RAG with Contextual Retrieval in PostgreSQL\". Enhance generation in language models using PostgreSQL for contextual retrieval with vector search and keyword bm25 scoring."
url: "https://hashnode.com/posts/optimize-rag-with-contextual-retrieval-in-postgresql/68394ffe24aef81230ed34bb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Optimize RAG with Contextual Retrieval in PostgreSQL](https://blog.vectorchord.ai/optimize-rag-with-contextual-retrieval-in-postgresql?utm_source=hashnode&utm_medium=feed)

Enhance generation in language models using PostgreSQL for contextual retrieval with vector search and keyword bm25 scoring.

May 30, 2025 · 6 min read · blog.vectorchord.ai  
Read the article

-   [#contextual-retrieval](https://hashnode.com/tag/contextual-retrieval)
-   [#bm25](https://hashnode.com/tag/bm25)
-   [#vectorsearch](https://hashnode.com/tag/vectorsearch)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#gemini](https://hashnode.com/tag/gemini)
-   [#llm](https://hashnode.com/tag/llm)
-   [#rag](https://hashnode.com/tag/rag)

## Written by

[Keming](https://hashnode.com/@kemingy)

@kemingy

  
[View profile](https://hashnode.com/@kemingy)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
