Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add a readme for the pgai docs. #307

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9a7835b
feat: Add a readme for the pgai docs.
billy-the-fish Dec 16, 2024
8b033e8
Apply suggestions from code review
billy-the-fish Dec 16, 2024
c779dbc
feat: update on review.
billy-the-fish Dec 16, 2024
c374cdc
chore: fix broken pgai build by pinning hatchling (#308)
JamesGuthrie Dec 16, 2024
3ced1f6
chore: support uv in extension install, use for dev (#309)
JamesGuthrie Dec 16, 2024
f6af7f0
feat: add a semantic catalog for db objs and example sql
jgpruitt Dec 2, 2024
606f4bd
feat: add ai.find_relevant_sql semantic catalog function
jgpruitt Dec 11, 2024
fb8d1c2
feat: add ai.find_relevant_obj() functions
jgpruitt Dec 11, 2024
fb73597
ci: pgspot chokes on valid code. disabling for now
jgpruitt Dec 11, 2024
29f52b8
fix: ignore ollama.base_url in test
jgpruitt Dec 11, 2024
28f5009
feat: only find relevant db objs that user has privs to
jgpruitt Dec 12, 2024
7464d74
feat: allow find_relevant_obj to be restricted to a given obj type
jgpruitt Dec 12, 2024
ae3d529
feat: return dist and add max_dist filter to semantic_catalog funcs
jgpruitt Dec 13, 2024
e8f4276
chore: clean up event triggers to only update columns strictly required
jgpruitt Dec 13, 2024
3eca351
chore: add foreign key constraints to semantic catalog on vectorizer
jgpruitt Dec 13, 2024
1f34e48
chore: reorder arguments for semantic catalog functions
jgpruitt Dec 13, 2024
937710a
chore: support multiple objtype filters in find_relevant_obj()
jgpruitt Dec 13, 2024
3ffdee5
feat: add vectorizer_embed convenience function
jgpruitt Dec 13, 2024
65321e4
chore: make an immutable version of vectorizer_embed
jgpruitt Dec 16, 2024
0b699f8
chore: rename semantic_catalog.name to semantic_catalog.catalog_name
jgpruitt Dec 16, 2024
6906c51
fix: exclude python system packages for versioned extension (#310)
JamesGuthrie Dec 17, 2024
586cdc7
fix: deprecation warning on re.split
MasterOdin Dec 17, 2024
4cd8a61
chore: remove pip caching
JamesGuthrie Dec 17, 2024
b62fb49
docs: remove openai mention from quickstart, fix opclasses in hnsw in…
Askir Dec 17, 2024
438a3fb
feat: construct a prompt for text-to-sql using relevant desc
jgpruitt Dec 17, 2024
1479ac5
feat: add a text_to_sql function
jgpruitt Dec 17, 2024
5d92f19
chore: split embedders in individual files (#315)
smoya Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

<p align="center">
<img height="200" src="/docs/images/pgai_logo.png" alt="pgai"/>
</p>

<div align=center>

<h3>pgai documentation</h3>

[![Discord](https://img.shields.io/badge/Join_us_on_Discord-black?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/KRdHVXAmkp)
[![Try Timescale for free](https://img.shields.io/badge/Try_Timescale_for_free-black?style=for-the-badge&logo=timescale&logoColor=white)](https://tsdb.co/gh-pgai-signup)
</div>

pgai is a PostgreSQL extension that simplifies data storage and retrieval for [Retrieval Augmented Generation](https://en.wikipedia.org/wiki/Prompt_engineering#Retrieval-augmented_generation) (RAG), and other AI applications.
In particular, it automates the creation and sync of embeddings for your data stored in PostgreSQL, simplifies
[semantic search](https://en.wikipedia.org/wiki/Semantic_search), and allows you to call LLM models from SQL.

The pgai documentation helps you setup, use and develop the projects that make up pgai.


## Vectorizer
billy-the-fish marked this conversation as resolved.
Show resolved Hide resolved

Vectorizer automates the embedding process within your database management by treating embeddings as a declarative,
DDL-like feature — like an index.

- **Get started**:
* [Vectorizer quickstart](/docs/vectorizer-quick-start.md): setup your developer environment, create and run a vectorizer.
billy-the-fish marked this conversation as resolved.
Show resolved Hide resolved
* [Vectorizer quickstart for OpenAI](/docs/vectorizer-quick-start-openai.md): setup your developer environment, create and run a vectorizer using OpenAI.
* [Vectorizer quickstart for Voyage](/docs/vectorizer-quick-start-voyage.md): setup your developer environment, create and run a vectorizer using Voyage.
- **Use**:
* [Automate AI embedding with pgai Vectorizer](/docs/vectorizer.md): a comprehensive overview of Vectorizer features,
demonstrating how it streamlines the process of working with vector embeddings in your database.
* [Run vectorizers using pgai vectorizer worker](/docs/vectorizer-worker.md): run vectorizers on a self-hosted TimescaleDB instance.
- **Develop**:
* [Add a Vectorizer embedding integration](/docs/vectorizer-add-a-embedding-integration.md):
- **Reference**:
* [pgai Vectorizer API reference](/docs/vectorizer-api-reference.md): API reference for Vectorizer functions

## pgai
billy-the-fish marked this conversation as resolved.
Show resolved Hide resolved

Simplifies data storage and retrieval for AI apps.

- **Get started**:
* [Install pgai with Docker](/docs/install_docker.md): run pgai in a container environment.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these installation guides apply across vectorizer and model calling. They should be in a separate top-level install section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunnnnn

* [Setup pgai with Anthropic](/docs/anthropic.md): configure pgai to connect to your Anthropic account.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you just copy over the table we have on the front page? I think the table is easier to understand... unless we need this for SEO?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunnnnnn

* [Setup pgai with Cohere](/docs/cohere.md): configure pgai to connect to your Cohere account.
* [Setup pgai with Ollama](/docs/ollama.md): configure pgai to connect to your Ollama account.
* [Setup pgai with OpenAI](/docs/openai.md): configure pgai to connect to your OpenAI account.
* [Setup pgai with Voyage AI](/docs/voyageai.md): configure pgai to connect to your Voyage AI account.
- **Use**:
* [Delayed embed](/docs/delayed_embed.md): run pgai using pgai or TimescaleDB background actions.
* [Load dataset from Hugging Face](/docs/load_dataset_from_huggingface.md): load datasets from Hugging Face's datasets library directly into your PostgreSQL database.
* [Moderate comments using OpenAI](/docs/moderate.md): use triggers or actions to moderate comments using OpenAI.
* [Secure pgai with user privilages](/docs/privileges.md): grant the necessary permissions for a specific user or role to use pgai functionality.
- **Develop**:
* [Install pgai from source](/docs/install_from_source.md): create an environment to develop pgai.









2 changes: 1 addition & 1 deletion docs/moderate.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Moderate
# Moderate comments using OpenAI

Let's say you want to moderate comments using OpenAI. You can do it in two ways:

Expand Down
1 change: 1 addition & 0 deletions docs/privileges.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Secure pgai with user privilages

The ai.grant_ai_usage function is an important security and access control tool
in the pgai extension. Its primary purpose is to grant the necessary permissions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Adding a Vectorizer embedding integration
# Add a Vectorizer embedding integration

We welcome contributions to add new vectorizer embedding integrations.

Expand Down
Loading