Search for the perfect car by describing it in natural language. We use a technique called "Generation Augmented Retrieval" to convert the natural language query into a Typesense query.
- Typesense
- Firebase Genkit
- Google Gemini
- NextJS
- Typescript
- Tailwind
- React Query
The dataset contains 6500 cars and is available on Kaggle.
├── scripts/
│ ├── data/
│ │ └── cars.json
│ └── indexTypesense.ts # script that index data from cars.json into typesense server
└── src/
├── app/
│ ├── genkit.ts # AI prompt and flows
│ └── page.tsx
├── components/
│ └── UI components...
├── schemas/
│ └── typesense.ts # define the response schema for genkit.ts
└── lib/
└── typesense.ts # typesense client config
To run this project locally, make sure you have docker and nodejs, clone this project, install dependencies and start the dev server:
Start typesense server
npm run start:typesense # or: docker compose up
Index data into typesense
npm run index:typesense
Update collection metadata, this will be used to provide additional information about each collection property for the LLM.
npm run updateMetadata:typesense
Start the dev server
npm run dev
Open http://localhost:3000 to see the app ✌️
See .env.example for environment variables.