When using ChatGPT and Pinecone as a source I’m getting messages that say "Found document with no ‘input’ key. Skipping. And the answer that gets returned says it can’t find information around the prompt I gave it.
Found document with no `input` key. Skipping.
Found document with no `input` key. Skipping.
Found document with no `input` key. Skipping.
Found document with no `input` key. Skipping.
Question: Please describe our slack guidelines
----
Answer: I'm sorry, but I don't have access to your specific slack guidelines. It would be best to refer to your company's internal resources or ask your team or supervisor for the specific guidelines.
vectorstore = Pinecone(
index, embed.embed_query, text_field, namespace
)
llm = ChatOpenAI(
openai_api_key=OPENAI_API_KEY, model_name="gpt-3.5-turbo", temperature=0.0
)
qa = RetrievalQA.from_chain_type(llm=llm, retriever=vectorstore.as_retriever())
# Enter your query here.
query = "Please describe our slack guidelines"
answer = qa.run(query)
print("Question: ", query)
print("----")
print("Answer: ", answer)
Querying Pinecone directly with this code I do get results back.
query_embedding = openai.Embedding.create(input=[query], engine=model_name)
embedding_value = query_embedding["data"][0]["embedding"]
res = index.query(embedding_value, top_k=3, include_metadata=True, namespace=namespace)
for match in res["matches"]:
# print(match["metadata"]["input"])
print(match)
print("----")
My object that gets returned has this structure:
{'id': 'AjRiMGJiYTAxLTRlNTgtNGJlNy1iNjk0LTUwMjc2NzUzNmZmMgA',
'metadata': {'flow_document': '{"_meta":{"uuid":"af866e64-3bd7-11ee-ac01-7f916fdeadfa"},"bold":false,"color":"default","id":"4b0bba01-4e58-4be7-b694-502767536ff2","input":"Acme'
'welcomes open and honest conversations in '
'Slack, but not at the cost of excluding '
'another employee or harming them in any way. '
'Remember that we all have a different '
'preferences in our engagement with Slack '
'during the workday for conversations not '
'related to the work. Be cognizant of this as '
'it can either enable, or prohibit, an '
'employee’s sense of focus, productivity, or '
'safety in our virtual '
'space.","strikethrough":false}'},
'score': 0.794169545,
'values': []}