Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the output is empty? #20

Open
pinkyyy333 opened this issue Jan 4, 2025 · 1 comment
Open

Why the output is empty? #20

pinkyyy333 opened this issue Jan 4, 2025 · 1 comment

Comments

@pinkyyy333
Copy link

Hi, I am a complete novice in coding.
And here is my output
There aren't any context
Initially, when I run ' python query_data.py "How does Alice meet the Mad Hatter?" '
the output is "Unable to find matching results."
So I delect this

if len(results) == 0 or results[0][1] < 0.7:
    print(f"Unable to find matching results.")
    return

then I run ' python query_data.py "How does Alice meet the Mad Hatter?" '

PS C:\langchain-rag-tutorial-main> python create_database.py
Split 1 documents into 801 chunks.
So she was considering in her own mind (as well as she could, for the
hot day made her feel very sleepy and stupid), whether the pleasure of
making a daisy-chain would be worth the trouble of getting up and
picking the daisies, when suddenly a White Rabbit with pink eyes ran
close by her.
{'source': 'data\\books\\alice_in_wonderland.md', 'start_index': 1654}
PS C:\langchain-rag-tutorial-main> python query_data.py "How does Alice meet the Mad Hatter?"
Human: 
Answer the question based only on the following context:



---

Answer the question based on the above context: How does Alice meet the Mad Hatter?

C:\langchain-rag-tutorial-main\query_data.py:51: LangChainDeprecationWarning: The method `BaseChatModel.predict` was deprecated in langchain-core 0.1.7 and will be removed in 1.0. Use invoke instead.
  response_text = model.predict(prompt)
Response: Alice meets the Mad Hatter at a tea party in Wonderland.
Sources: []
PS C:\langchain-rag-tutorial-main> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@pinkyyy333 and others