gkamradt / langchain-tutorials

Overview and tutorial of the LangChain Library
6.63k stars 1.92k forks source link

How to control the length of final summary using map_reduce? #30

Open wuzimi opened 1 year ago

wuzimi commented 1 year ago

Sometimes I find the final summary is too short, how can make it longer? Thanks!

minkj1992 commented 1 year ago

If you use the map_reduce maybe pass the combine prompt, like below

... your combine prompt

SUMMARIZE 3000 WORDS IN ENGLISH:

wuzimi commented 1 year ago

Thanks! It works in English summary. But if I ask it to summarize in Chinese it can't even give a complete output which ended without a complete sentence. Any way to improve this?

Minwook Je @.***> 于2023年6月3日周六 18:03写道:

If you use the map_reduce maybe pass the combine prompt, like below

... your combine prompt

SUMMARIZE 3000 WORDS IN ENGLISH:

— Reply to this email directly, view it on GitHub https://github.com/gkamradt/langchain-tutorials/issues/30#issuecomment-1574828406, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4ZON2HANR6A4FSWKKQKNJTXJMDYHANCNFSM6AAAAAAYRFHH5E . You are receiving this because you authored the thread.Message ID: @.***>