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

[Chain] Summarize returns empty result when intermediate documents contain hashtag # #603

Closed
vertinski opened this issue Jan 13, 2023 · 4 comments

Comments

@vertinski
Copy link
Contributor

Summarize returns empty result when intermediate documents contain hashtag #. Otherwise using different prompt which doesn't generate hashtags all is cool.

prompt_template = """Write a tweet from the following text:
{text}
"""

PROMPT = PromptTemplate (template=prompt_template, input_variables=["text"])
chain = load_summarize_chain (llm, chain_type="map_reduce", map_prompt=PROMPT, combine_prompt=PROMPT)
chain.run (docs)
''

@hwchase17
Copy link
Contributor

Screen Shot 2023-01-13 at 5 38 16 PM
hmm its not giving me any issues (see above)

do you want to create a google collab notebook with an example so i can replicate there?

@vertinski
Copy link
Contributor Author

vertinski commented Jan 18, 2023

here's the notebook:

https://github.com/vertinski/langchain_bugtest/blob/main/langchain_test_001.ipynb

I think it might be the davinci-003 issue, because often it returns inconsistent results....
(also sorry for posting notebook on github!)

[UPDATE]
This specific doc (whether alone or together with other docs) returns empty string intermediate_step, which affects results:
https://github.com/vertinski/langchain_bugtest/blob/main/bug_doc-001.txt

@vertinski
Copy link
Contributor Author

The issue was in prompting. I submitted a pull request ✌️
#660

@hwchase17
Copy link
Contributor

thanks for raising and fixing!

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