Creating a car analyser AI

Published: (February 15, 2026 at 05:03 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Introduction

I’ve become interested in building a car‑analysis AI. The goal is to help users quickly understand a vehicle’s condition and history without manually scrolling through multiple sites.

Data Source

The vehicle inspection data is available from a free government API. By querying a licence plate, we can retrieve a range of information such as MOT results, registration details, and more.

Architecture Overview

  1. User Input – The user enters a licence plate number on the front‑end.
  2. Cache Check – The back‑end checks whether the same licence plate has already been requested (by the same or another user).
    • If a cached result exists, it is returned immediately, saving API calls and token usage.
    • If it’s a cache miss, the system proceeds to fetch fresh data.
  3. Data Retrieval – Query the free government API with the licence plate.
  4. Data Normalisation – Structure the raw response into a single vehicle analysis object.
  5. Prompt Construction – Serialise the object to JSON and embed it in a concise prompt for the AI model.
  6. AI Processing – The model generates a response that is also formatted as JSON, making it easy to deserialise and use.
  7. Result Transformation – Convert the AI output into a front‑end‑friendly format.
  8. Caching – Store the final result in the cache with an appropriate expiry time.

Caching Strategy

  • Purpose – Reduce redundant calls to both the free data API and the AI model, lowering latency and cost.
  • Expiry Considerations
    • Vehicle listings can change quickly (often within 1–2 days).
    • To avoid stale data and excessive memory usage, a starting expiry of 6 hours is proposed, with adjustments based on monitoring.
  • Monitoring – Track request volume to the free API and cache hit/miss rates to fine‑tune the expiry policy.

Next Steps

  1. Explore the free API documentation in depth.
  2. Define the schema for the vehicle analysis object.
  3. Implement the cache layer and set up monitoring.
  4. Integrate the AI model, ensuring the prompt and response are JSON‑based.

Thanks for reading – stay tuned for the next installment! 🙌

0 views
Back to Blog

Related posts

Read more »