Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

How we index images for RAG (https://www.kapa.ai)

204 points by mooreds 4 days ago | 29 comments | View on ycombinator

hparadiz 4 days ago |

With media ingestion this is called "eager" processing. Historically for things like pulling thumbnails for images / video and pre-generating common sizes for things. This follows the same pattern and makes all the sense in the world. My only concern is that due to the non deterministic nature of LLMs new models will reveal new information about your data.

For example you might identify a car in an image but the context is the car running a red light. A new model might pick that up while an old one doesn't. These context adjustments might sometimes require you to rerun your LLM processing or potentially have a one to many relationship for multiple runs so you can take the best of or combine results.

Actual usage will also reveal most commonly used assets and you can target the ones that are most trafficked and save a ton on processing that way.

bad_username 4 days ago |

> we don't send images to the model at query time. We describe each image once, at indexing time, with a cheap vision model, store the descriptions as text, and retrieve them alongside ordinary text chunks

This is what I've been doing in my Obsidian infodump for a while. If I know that an image is important, I generate a text description (Mermaid if possible, English if not) and paste it after the image in a block. This lets agents see the image if they don't really see it. Though my process is manual, the improvements in outcomes for agents that rely on text search/retrieval is very real and is worth it.

EGreg 4 days ago |

m4rkuskk 3 days ago |

Its an ad for their product. There is nothing special about this approach and probably done the same way by everyone else.

furyman 4 days ago |

Well I don't know if this one has been getting by others too but I have been doing this since 2 years ago and it works really well. Except the fact that for the documents I had to chunk containing these images I had to chase the authors(multiple of them) to update the relevant captions for their images. It is cost efficient than multi-modal. Lesser ingestion time altogether. Only part is that if the retrieval query is a question which can be answered only after looking at the image, then this architecture would need some little modification.

fhouser 4 days ago |

That's smart. Just the other day, I was thinking about how I would solve images/graphs/rich PDF stuff in a RAG system. Now I know more, thanks!

endendino about 20 hours ago |

I did it a year ago for my company knowledge base we have an internal chatbot that answers with guides with images in the correct place. I did it for videos and webinars as well used Gemini to analyze videos and send people to the direct time that explains about the user question

vessenes 3 days ago |

"This is what makes the load-bearing case work,"

Man I hate that AI writing tic. I appreciate the instincts for sharing the workflow. It's still very difficult to get AI to put an info dense description together though, we tend to get long and vague.

relevant_stats 3 days ago |

Seriously?

- Marketing material? check

- Bloated to the extreme? check

- "Get a free trial" at the end? check

- Entirely LLM generated? check

383toast 4 days ago |

why not a multimodal embedding model?

iot_devs 4 days ago |

How descripting is the caption that you obtain?

So you include colour, shapes, etc?

hanzeweiasa 3 days ago |

[flagged]

davidladdsource 4 days ago |

[flagged]

infoinlet 3 days ago |

[flagged]

justacatbot 4 days ago |

[flagged]

haeseong 3 days ago |

[flagged]

sanreds 3 days ago |

[flagged]

songting591 3 days ago |

[flagged]

EvanXue 3 days ago |

[flagged]

factden 3 days ago |

[dead]

hparadiz 4 days ago |

That cookie popup just makes me wanna leave and never come back

hbwang2076 4 days ago |

[flagged]