Find answers from the community

Updated 2 weeks ago

Choosing Data to Include or Exclude in Query Engine for OpenAI Seed Mechanism

hey. i want to use the seed mechanism of openai. but i use query engine with my data, and it sends some additional data that i don't want to send it in prompt so i can use the seed mechanism properly. how can i choose what data to send what data to exclude in query engine?
L
b
7 comments
I'm not sure what you mean by data to exclude? Can you give an example?
okay.
Plain Text
    answer_engine = index.as_query_engine(doc_ids=doc_ids, output_cls=ev.output, use_async=True, llm=self.llm)


this is how i create the query engine .

when i send a text to openai using the query engine, llamaindex automatically includes some additional texts in prompt similar to this;
Context information is below.\n---------------------\nfile_name: 695658e2-6966-48b5-be32-61aa29a19257
and rest of the data.

since this file names/doc ids are different, i believe i cant use the seed mechanism properly, therefore results are different.

everything except the file_name/doc_ids are same.
Metadata from your documents is automatically included in the llm and embedding calls. You can exclude fields programatically before ingesting

Plain Text
document.exlcuded_llm_metadata_keys = ["file_name"]
document.exlcuded_embed_metadata_keys = ["file_name"]
okay, let me check
i think it works, i fucking love you
πŸ”₯ :LlamaIndex:
Add a reply
Sign up and join the conversation on Discord