Giter VIP home page Giter VIP logo

showcase-conversational-search-pg-essays's Introduction

Note

Work in progress ๐Ÿšง

Conversational search with Typesense + Next.js App router

This demo showcases Typesense's conversational search features.

The dataset contains essays authored by Paul Graham, indexed in Typesense.

Questions are sent directly to Typesense, which has a built-in RAG pipeline to return a conversation response, using the indexed dataset as context.

Pre-requisites

  1. Node.js 20.x and npm
  2. Typesense server. Can be hosted locally using the docker-compose.yml file in the repository, instructions in Local Setup section.

Local Setup

  1. Clone the project.

  2. Install dependencies at the root of the project using npm.

    npm install
  3. (Optional) To run a local instance of Typesense server using the docker-compose.yml config in this repository, run the following command.

    docker compose up -d

    Note: This requires Docker to be installed on the system.

  4. Copy .env.example file and create a .env file at the root of the project.

  5. Set the values of required environment variables in the .env file that was created. (Skip the TYPESENSE_CONVERSATION_MODEL_ID env variable for now, we'll come back to it).

  6. Run the following command to create the dataset by fetching Paul Graham's essays:

    npm run fetchData
  7. Import the data into Typesense by running the following command.

    npm run indexInTypesense

    This command may take a while depending on the size of the data.

  8. The script will output a conversational model ID, which you want to set as the TYPESENSE_CONVERSATION_MODEL_ID in your .env file.

  9. Now start the Next.js application.

    • For production:
      npm run build
      npm start
    • For development:
      npm run dev
  10. Access the application at localhost:3000.

Learn More

License

This project is licensed under Apache License 2.0. The dataset used is Paul Graham's essays by Paul Graham.

showcase-conversational-search-pg-essays's People

Contributors

blenderskool avatar jasonbosco avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

jasonbosco

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.