You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use llama_index to summarize information from multiple articles, my code is like this:
def get_answer_from_llama_web(message, urls, logger):
logger.info('=====> Use llama with chatGPT to answer!')
combained_urls = get_urls(urls)
logger.info(combained_urls)
documents = get_documents_from_urls(combained_urls)
llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0, model_name="gpt-3.5-turbo"))
logger.info(documents)
index = GPTSimpleVectorIndex(documents, text_qa_template=QUESTION_ANSWER_PROMPT)
return index.query(message, llm_predictor=llm_predictor)
This code will fetch multiple articles from the URLs and use the GPTSimpleVectorIndex to summarize information. What I want is to summarize the information by article. But when given the prompt is:
For the following articles to write an article recommendation email out, my requirements.
1. write a separate summary paragraph for each article, sorting out the most valuable parts
https://mp.weixin.qq.com/s/JFbdL0oUAlZU-os6CerSog
https://mp.weixin.qq.com/s/SZsW-SlkWdQq-aAyrCikDw
https://mp.weixin.qq.com/s/Wx5q-rEwG4sROvnewGxWrw
But the answer is totally wrong which is looks nothing to do with the content of the article. My question is what index is suitable to do this work?
The text was updated successfully, but these errors were encountered:
When I use llama_index to summarize information from multiple articles, my code is like this:
This code will fetch multiple articles from the URLs and use the
GPTSimpleVectorIndex
to summarize information. What I want is to summarize the information by article. But when given the prompt is:But the answer is totally wrong which is looks nothing to do with the content of the article. My question is what index is suitable to do this work?
The text was updated successfully, but these errors were encountered: