Quantcast
Channel: Active questions tagged mongodb-atlas - Stack Overflow
Viewing all articles
Browse latest Browse all 290

Why are the docs not being found in Spring AI Vector Store when they exist in mongo?

$
0
0

I am working on a simple RAG using Spring AI and my MQTT server project available here. I swear I had it working once but I didn't commit and now it isn't working again. Basically I think this issue is with the vectorstore. I say that because here

public void updateSmartHomeVectors() throws JsonProcessingException {        String smartHomeJson = haNetworkCache.getSmartHomeJson();        List<Document> documents = tokenizeSmartHomeStatus(smartHomeJson);        vectorStore.add(documents);        logger.warn("Smart Home Vectors Updated");}

When I break point on the last line I see

enter image description here

But when I try to confirm they were added using vectorStore.similaritySearch(SearchRequest.query("door").withTopK(5)) I get a result of 0 even though I see things like

enter image description here

in mongo. And when I try to ask it a question I get

I'm sorry, but I can't determine what devices are available without additional context or >specific information about your setup. Please provide more details or check your smart >home app or hub for a list of connected devices.

What am I missing why is it not seeing the rag info


Viewing all articles
Browse latest Browse all 290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>