0
const simpleRes = await vectorStore.similaritySearchWithScore(question);
console.log(simpleRes);

How can I know if it uses tokens in similarity search, does my question converted to vector and uses OpenAIEmbeddings before it search the closest vector in the database?

toyota Supra
  • 3,181
  • 4
  • 15
  • 19
Uno_Count
  • 3
  • 2

1 Answers1

0

when you do a similarity search in the database there is no token usage.

Tokens are the basic units of text or code that an LLM AI uses to process and generate language.

You consume tokens when you send the most similar chunks to the LLM

Yilmaz
  • 35,338
  • 10
  • 157
  • 202