Back to directory

Serverless AI Chat with RAG using LangChain.js

A sample serverless chat application with retrieval-augmented generation, built with LangChain.js, Azure Functions, Azure Static Web Apps and Azure Cosmos DB as the vector store.

Serverless AI Chat with RAG using LangChain.js

This sample shows how to build a serverless AI chat application with retrieval-augmented generation using LangChain.js and Azure. A web app built with Lit and hosted on Azure Static Web Apps talks to a serverless API built with Azure Functions, which uses LangChain.js to ingest documents and generate responses; Azure Cosmos DB for NoSQL stores chat sessions, extracted document text and vectors, and Azure Blob Storage holds the source documents.

The bundled sample data describes a fictitious real-estate company's terms of service, privacy policy and support guide, so the chatbot can answer support questions about them out of the box, and can be replaced with a user's own documents. The application can also be tested locally at no cost using Ollama instead of a hosted model.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.