Business

Timescale Vector Brings Faster Vector Search to LangChain

Timescale has integrated its Timescale Vector database with LangChain, allowing developers to perform faster similarity searches and time-based filtering within a unified PostgreSQL environment.

LangChain Blog10 hrs agoBusiness
Image: LangChain Blog

The integration of Timescale Vector with LangChain brings advanced vector database capabilities directly to PostgreSQL. By combining vector embeddings, relational data, and time-series data into a single cloud database, the integration simplifies the AI infrastructure stack. Developers can now leverage PostgreSQL for fast vector similarity searches and time-based context retrieval without the operational complexity of managing multiple database systems.

Performance benchmarks on a dataset of one million OpenAI embeddings show that Timescale Vector's new search index, which is inspired by the DiskANN algorithm, achieves 243.77% faster search speeds at approximately 99% recall than the specialized vector database Weaviate. Furthermore, it outperforms existing PostgreSQL search indexes by between 39.43% and 1,590.33%. The platform also supports product quantization, which can shrink index sizes by up to 10x compared to standard pgvector indexes, alongside traditional HNSW and IVFFlat indexing algorithms.

For practitioners, the integration introduces efficient time-based filtering by leveraging Timescale's hypertable technology to partition data automatically. This allows developers to easily constrain similarity searches to specific time ranges, retrieve recent embeddings, or manage LLM chat histories. In Retrieval Augmented Generation (RAG) applications, this enables time-based context retrieval, ensuring that the language model receives the most relevant and timely information.

Additionally, the integration supports LangChain's self-querying retriever, allowing natural language queries to be translated into SQL queries with metadata and time-based filters. To encourage adoption, Timescale is offering LangChain users an extended 90-day free trial of Timescale Vector, during which they will not be charged for any cloud PostgreSQL databases they create.

This is our own summary of reporting by LangChain Blog

More in Business