Dify returning information from document that is currently not in the knowledge base but was present earlier #1638

Closed
opened 2026-02-21 17:36:05 -05:00 by yindo · 0 comments
Owner

Originally created by @ayushiKanjiya on GitHub (Mar 28, 2024).

Originally assigned to: @JohnJyong on GitHub.

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.5.10

Cloud or Self Hosted

Cloud

Steps to reproduce

I created knowledge and attached it to a text-generated app. Below is the prompt in the application

I uploaded Document1 to knowledge and executed some queries to get information from Document1. After getting information, I deleted Document1 from knowledge.

I then uploaded Document2 to knowledge and executed some queries to get information from Document2. After getting information, I deleted Document2 from knowledge.

Document 1: Ayushi@CV.docx.pdf
Document 2: JT_Resume.pdf

===================================================================================

Application
Prompt:

If you can't find the answer, then please return null.
Please give answer in array.
Like: {"personal_info": {"name" : "", "location" : "", "contact" : "", "email" : "", "total_experience_year" : ""},
"technical_skill": ["",""], "soft_skill": ["",""], "social_link": ["",""], "education": [{"degree" : "", "university": "", "CGPA": "", "year" : ""}], "experience": [{"company": "", "location": "", "from": "", "to": "", "role": "", "project": [{"project_name" : "", "project_url" : "", "project_description" : ""}]]}
If I have multiple education or experience, then please return into array.
If you don't find any value then please return null.
In below Experience, there should be mention current company and past company name and location also.
please generate whole answer in above format only object.

✔️ Expected Behavior

I need to get the actual data that is mentioned in the Document2, whose document name is mentioned in the query.

Document 2: JT_Resume.pdf
Query: Give an answer in words, not sentences. Please give all the information mentioned in Prefix Prompt (personal_info, technical_skill, soft_skill, social_link, education, experience) from JT_Resume.pdf.

Output: {"personal_info": {"name" : "Jinal Thakkar", "location" : null, "contact" : "9930932770", "email" : "jkap@techknowledge.io", "total_experience_year" : null},
"technical_skill": ["Python", "Django", "React", "MySQL", "Firebase", "MongoDB", "AWS", "Linux", "Golang", "Flask", "PyQt5", "Windows Server 2000", "RESTful APIs", "Multithreading", "Multiprocessing", "DSA", "OOPS"],
"soft_skill": null,
"social_link": ["rahul-singh98", "rahulsingh", "Leetcode"],
"education": [{"degree" : "Masters of Computer Applications", "university": "Indira Gandhi National Open University", "CGPA": null, "year" : "Sep 2024"}, {"degree" : "Bachelor of Computer Applications", "university": "Indira Gandhi National Open University", "CGPA": null, "year" : "Sep 2022"}],
"experience": [{"company": "Vide Alpha Tech", "location": null, "from": "Mar 2023", "to": "Present", "role": "Senior Python Developer", "project": [{"project_name" : "Real-Time Trading Application for Forex Market", "project_url" : null, "project_description" : "Leading the design and development using Golang and React. Implementing software applications and building RESTful APIs for seamless integration of different software systems."}]}, {"company": "Codesure Software Solutions", "location": null, "from": "Mar 2021", "to": "Feb 2023", "role": "Python Developer", "project": [{"project_name" : null, "project_url" : null, "project_description" : "Developed and implemented software applications using Golang. Proficient in writing automated unit tests and building RESTful APIs for seamless software integration."}]}]}

Actual Behavior

It returns the data from Document1 instead of Document2.

Document 2: JT_Resume.pdf
Query: Give an answer in words, not sentences. Please give all the information mentioned in the Prefix Prompt (personal_info, technical_skill, soft_skill, social_link, education, experience) from JT_Resume.pdf.

Output: {"personal_info": {"name" : "AYUSHI KANJIYA", "location" : "Jamnagar, India, 361140", "contact" : "-", "email" : "ayushidetroja28@gmail.com", "total_experience_year" : "3 years"},
"technical_skill": ["C", "C++", "Java", "JavaScript", "TypeScript", "jQuery", "BootStrap", "NoSQL", "SQLite", "HTML", "CSS", "Tailwind", "SASS", "Firebase", "Android", "React.js", "Next.js", "Vue.js", "Debugging", "Git"],
"soft_skill": ["Communication skill"],
"social_link": null,
"education": [{"degree" : "B.Tech (Information Technology)", "university": "Uka Tarsadiya University", "CGPA": "7.19", "year" : "06/2019"}, {"degree" : "Higher Secondary", "university": "I. P. Savani", "GPA": "76", "year" : "05/2014"}],
"experience": [{"company": "Copieux Techknowledge Analytics (WFH)", "location": "Mumbai, India", "from": "06/2023", "to": "Current", "role": "Software Engineer II", "project": null}, {"company": "Micrasol LLP", "location": "Surat, India", "from": "09/2020", "to": "05/2023", "role": "Senior Web Developer", "project": null}, {"company": "Sparkle Infotech", "location": "Surat, India", "from": "07/2019", "to": "08/2020", "role": "Android Developer", "project": null}]}

Originally created by @ayushiKanjiya on GitHub (Mar 28, 2024). Originally assigned to: @JohnJyong on GitHub. ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Pleas do not modify this template :) and fill in all the required fields. ### Dify version 0.5.10 ### Cloud or Self Hosted Cloud ### Steps to reproduce I created knowledge and attached it to a text-generated app. Below is the prompt in the application I uploaded Document1 to knowledge and executed some queries to get information from Document1. After getting information, I deleted Document1 from knowledge. I then uploaded Document2 to knowledge and executed some queries to get information from Document2. After getting information, I deleted Document2 from knowledge. Document 1: [Ayushi@CV.docx.pdf](https://github.com/langgenius/dify/files/14787128/Ayushi%40CV.docx.pdf) Document 2: [JT_Resume.pdf](https://github.com/langgenius/dify/files/14787136/JT_Resume.pdf) =================================================================================== Application Prompt: If you can't find the answer, then please return null. Please give answer in array. Like: {"personal_info": {"name" : "", "location" : "", "contact" : "", "email" : "", "total_experience_year" : ""}, "technical_skill": ["",""], "soft_skill": ["",""], "social_link": ["",""], "education": [{"degree" : "", "university": "", "CGPA": "", "year" : ""}], "experience": [{"company": "", "location": "", "from": "", "to": "", "role": "", "project": [{"project_name" : "", "project_url" : "", "project_description" : ""}]]} If I have multiple education or experience, then please return into array. If you don't find any value then please return null. In below Experience, there should be mention current company and past company name and location also. please generate whole answer in above format only object. ### ✔️ Expected Behavior I need to get the actual data that is mentioned in the Document2, whose document name is mentioned in the query. Document 2: [JT_Resume.pdf](https://github.com/langgenius/dify/files/14787136/JT_Resume.pdf) Query: Give an answer in words, not sentences. Please give all the information mentioned in Prefix Prompt (personal_info, technical_skill, soft_skill, social_link, education, experience) from JT_Resume.pdf. Output: {"personal_info": {"name" : "Jinal Thakkar", "location" : null, "contact" : "9930932770", "email" : "jkap@techknowledge.io", "total_experience_year" : null}, "technical_skill": ["Python", "Django", "React", "MySQL", "Firebase", "MongoDB", "AWS", "Linux", "Golang", "Flask", "PyQt5", "Windows Server 2000", "RESTful APIs", "Multithreading", "Multiprocessing", "DSA", "OOPS"], "soft_skill": null, "social_link": ["rahul-singh98", "rahulsingh", "Leetcode"], "education": [{"degree" : "Masters of Computer Applications", "university": "Indira Gandhi National Open University", "CGPA": null, "year" : "Sep 2024"}, {"degree" : "Bachelor of Computer Applications", "university": "Indira Gandhi National Open University", "CGPA": null, "year" : "Sep 2022"}], "experience": [{"company": "Vide Alpha Tech", "location": null, "from": "Mar 2023", "to": "Present", "role": "Senior Python Developer", "project": [{"project_name" : "Real-Time Trading Application for Forex Market", "project_url" : null, "project_description" : "Leading the design and development using Golang and React. Implementing software applications and building RESTful APIs for seamless integration of different software systems."}]}, {"company": "Codesure Software Solutions", "location": null, "from": "Mar 2021", "to": "Feb 2023", "role": "Python Developer", "project": [{"project_name" : null, "project_url" : null, "project_description" : "Developed and implemented software applications using Golang. Proficient in writing automated unit tests and building RESTful APIs for seamless software integration."}]}]} ### ❌ Actual Behavior It returns the data from Document1 instead of Document2. Document 2: [JT_Resume.pdf](https://github.com/langgenius/dify/files/14787136/JT_Resume.pdf) Query: Give an answer in words, not sentences. Please give all the information mentioned in the Prefix Prompt (personal_info, technical_skill, soft_skill, social_link, education, experience) from JT_Resume.pdf. Output: {"personal_info": {"name" : "AYUSHI KANJIYA", "location" : "Jamnagar, India, 361140", "contact" : "-", "email" : "[ayushidetroja28@gmail.com](mailto:ayushidetroja28@gmail.com)", "total_experience_year" : "3 years"}, "technical_skill": ["C", "C++", "Java", "JavaScript", "TypeScript", "jQuery", "BootStrap", "NoSQL", "SQLite", "HTML", "CSS", "Tailwind", "SASS", "Firebase", "Android", "React.js", "Next.js", "Vue.js", "Debugging", "Git"], "soft_skill": ["Communication skill"], "social_link": null, "education": [{"degree" : "B.Tech (Information Technology)", "university": "Uka Tarsadiya University", "CGPA": "7.19", "year" : "06/2019"}, {"degree" : "Higher Secondary", "university": "I. P. Savani", "GPA": "76", "year" : "05/2014"}], "experience": [{"company": "Copieux Techknowledge Analytics (WFH)", "location": "Mumbai, India", "from": "06/2023", "to": "Current", "role": "Software Engineer II", "project": null}, {"company": "Micrasol LLP", "location": "Surat, India", "from": "09/2020", "to": "05/2023", "role": "Senior Web Developer", "project": null}, {"company": "Sparkle Infotech", "location": "Surat, India", "from": "07/2019", "to": "08/2020", "role": "Android Developer", "project": null}]}
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 17:36:05 -05:00
yindo closed this issue 2026-02-21 17:36:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1638