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 configTo 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 upIndex data into typesense
npm run index:typesenseUpdate collection metadata, this will be used to provide additional information about each collection property for the LLM.
npm run updateMetadata:typesenseStart the dev server
npm run devOpen http://localhost:3000 to see the app ✌️
See .env.example for environment variables.