new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Supabase · all subjects

ai-tools/llamaindex

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

LlamaIndex SupabaseVectorStore integration

Supabase provides a SupabaseVectorStore for LlamaIndex, a data framework for LLM applications. A notebook example is available at https://github.com/supabase/supabase/blob/master/examples/ai/llamaindex/llamaindex.ipynb that demonstrates using LlamaIndex with Supabase for vector storage and querying.

Database connection string format for LlamaIndex Supabase

The database connection string must start with postgresql:// (not postgres://). SQLAlchemy requires this format. The connection string format is: postgresql://<user>:<pa••••••d>@<host>:<port>/<db_name>. Connection pooling strings (domain ending in *.pooler.supabase.com) must be used with Google Colab since Colab does not support IPv6.

LlamaIndex Supabase notebook setup steps

To use the LlamaIndex Supabase notebook: 1) Launch the notebook in Google Colab using the provided badge link. 2) Click 'Copy to Drive' to copy the notebook to your Google Drive. 3) Add your OPENAI_API_KEY to the notebook using os.environ['OPENAI_API_KEY'] = "[your_openai_api_key]". 4) Replace the DB_CONNECTION string with your project's connection string from the Connect section of your project dashboard. 5) Execute each cell using the execute button (ctrl+enter) to step through creating a collection, adding data, and querying it.

Viewing inserted LlamaIndex data in Supabase

After running the LlamaIndex notebook with Supabase, inserted items can be viewed in the Table Editor (/dashboard/project/_/editor/) by selecting the 'vecs' schema from the schema dropdown.

LlamaIndex Supabase resources

Official resources for LlamaIndex and Supabase integration: LlamaIndex + SupabaseVectorStore docs at https://developers.llamaindex.ai/python/examples/vector_stores/supabasevectorindexdemo/, and the official LlamaIndex repository at https://github.com/jerryjliu/llama_index/.

Give your agent this brain