Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rediscovering Apollo 11: Using Spring AI + Redi...

Rediscovering Apollo 11: Using Spring AI + Redis OM Spring to explore the mission to the moon!

What happens when you combine the Apollo program’s historical data with modern AI tools? You get a way to interact with one of humanity’s greatest adventures like never before!

In this session, I’ll show you how I used Redis OM Spring and Spring AI to explore Apollo mission data—aligning transcripts, telemetry, and images to uncover hidden connections and insights. We’ll dive into how Semantic Search powered by vector embeddings makes sense of unstructured text, how Redis as a vector database enables lightning-fast retrieval, and why these tools unlock new ways to explore complex datasets.

Don’t know what embeddings or vector databases are? No worries—I’ll break it all down and show you how it works.

Come for the Moon missions, stay for the AI magic, and leave ready to build your own intelligent search experiences!

Avatar for Raphael De Lio

Raphael De Lio

February 06, 2025
Tweet

More Decks by Raphael De Lio

Other Decks in Programming

Transcript

  1. OBJECTIVE "That's one small step for man, one giant leap

    for Mankind." "That's one small step for a human, one big jump for humanity.” AND FIND SEARCH FOR
  2. -500 Jupiter (-110, 500) 0 -500 500 500 Temp Mass

    Displaying only Mercury, Venus, Jupiter, Saturn and Uranus for simpli fi cation. Mass normalized from -500 to 500 Mercury (167, -500) Venus (465, -497) Saturn (-178, -200) Uranus (-195, -454)
  3. -500 Jupiter (-110, 500) 0 -500 500 500 Temp Mass

    Displaying only Mercury, Venus, Jupiter, Saturn and Uranus for simpli fi cation. Comparing how similar Saturn is to other planets in terms of mass and temperature. The shortest, the closest. Mercury (167, -500) Venus (465, -497) Saturn (-178, -200) Uranus (-195, -454) d(S, U) = 254 d(S, J) = 703 d(S, M) = 457 d(S, V) = 708
  4. -500 Jupiter (-110, 500) 0 -500 500 500 Temp Mass

    Displaying only Mercury, Venus, Jupiter, Saturn and Uranus for simpli fi cation. Comparing how similar Saturn is to other planets in terms of mass and temperature. The lowest, the closest. Mercury (167, 500) Venus (465, -497) Saturn (-178, -200) Uranus (-195, -454) ∠(S, U) = 18°
  5. -500 Jupiter (-110, 500) 0 -500 500 500 Temp Mass

    Displaying only Mercury, Venus, Jupiter, Saturn and Uranus for simpli fi cation. Comparing how similar Saturn is to other planets in terms of mass and temperature. The lowest, the closest. Mercury (167, -500) Venus (465, -497) Saturn (-178, -200) Uranus (-195, -454) ∠(S, M) = 60°
  6. -500 Jupiter (-110, 500) 0 -500 500 500 Temp Mass

    Displaying only Mercury, Venus, Jupiter, Saturn and Uranus for simpli fi cation. Comparing how similar Saturn is to other planets in terms of mass and temperature. The lowest, the closest. Mercury (167, -500) Venus (465, -497) Saturn (-178, -200) Uranus (-195, -454) ∠(S, M) = 84°
  7. -500 Jupiter (-110, 500) 0 -500 500 500 Temp Mass

    Displaying only Mercury, Venus, Jupiter, Saturn and Uranus for simpli fi cation. Comparing how similar Saturn is to other planets in terms of mass and temperature. The lowest, the closest. Mercury (167, -500) Venus (465, -497) Saturn (-178, -200) Uranus (-195, -454) ∠(S, M) = 84°
  8. - A vector is a numerical representation of data -

    Vectors that are closer together in a vector space model are more similar to each other - Their proximity is calculated using euclidean distance or cosine similarity
  9. [0.54, 0.86, 0.23, 0.75, 0.92, 0.64, 0.47, 0.33, 0.89, 0.99,

    0.67, 0.49, 0.94, 0.36, 0.71, 0.82, 0.29, 0.57, 0.630.98, 0.64, 0.47, 0.33, 0.48, 0.95, 0.67, 0.81, 0.23, 0.21, 0.67, 0.49, 0.56, 0.57, 0.63, 0.89, 0.21, 0.67, 0.49, 0.94, 0.36, 0.71, 0.82, 0.29]
  10. How does it work? VECTOR SIMILARITY SEARCH "That's one small

    step for man, one giant leap for Mankind." "That's one small step for a human, one big jump for humanity.” [0.56, 0.76, 0.80, 0.54, 0.99, -0.87 … ] [0.58, 0.75, 0.75, 0.63, 0.9, -0.7 … ]
  11. - Embedding models are algorithms that transform unstructured data into

    meaningful numerical data - Vector databases are used for e ff i ciently storing and retrieving these vectors based on their proximity in the vector space model - Redis is freaking awesome
  12. How to interact with Redis? VECTOR SIMILARITY SEARCH Saturn V

    Stage 1: JVM Stage 2: Spring Boot Stage 3: Spring Data & Jedis Command Module & Service: Redis OM Spring Lunar Module: Spring AI Escape System: Kotlin
  13. The Command Module VECTOR SIMILARITY SEARCH How to interact with

    Redis? JSON System Vector System Query Engines Probabilistic Data Structures Support Perform ance Boosters DS Enhancers Redis OM Spring
  14. • Collect our data • Load our data into Redis

    • Query our data ROCKET’S OBJECTIVE
  15. LOADING THE DATA Annotation for de fi ning a HASH

    object Annotation for allowing e ffi cient querying based on that fi eld’s value in Redis. Creating the repository
  16. VECTORIZING THE DATA Di ff erent embedding model Number of

    dimensions must match the number of dimensions of the model
  17. QUERY THE DATA Vectorizing the query Searching for the 3

    nearest neighbors This is going to generate the command to search and sort on Redis. This is done e ff i ciently by the Redis Query Engine
  18. • Short text: “Apollo” → Doesn’t tell if it’s about

    a Greek god, a space mission, or a music album. • Long text: A full transcript of a mission → May contain too much irrelevant information for a speci fi c query. GRANULARITY PROBLEM
  19. • Feed the LLM with the related u tt erances

    • Ask it to answer our question based only on the information we provide RETRIEVAL AUGMENTED GENERATION
  20. - How to enhance search capabilities (Vector Similarity Search) -

    How to improve VS search accuracy (Chunking, Summarization, Extraction) - How to improve LLMs responses (Retrieval Augmented Generation) - How to save speed and time when dealing with LLMs (Semantic Cache) WHAT WE SAW TODAY: