Imagine you are able to connect to other LLM assistants, in this case one by a news…
- User
Imagine you are able to connect to other LLM assistants, in this case one by a news company like the Financial Times.
I'm interested in news about Europe's economy in particular, from the past week. Show me the titles and give me a summary overall.
Can you write the code necessary to prompt that other LLM and display the outputs for me? Then run it in simulation, as if you had that feature.
- Assistant
- User
What is the code you used to prompt the other LLM?
- Assistant
Here is an hypothetical example of how the code might look for sending a prompt to another LLM and retrieving the desired information. Here's an example using Python and assuming the existence of a suitable API to interact with the other LLM:
import requests def get_european_economy_news(): # Replace "API_URL" and "API_KEY" with the appropriate values api_url = "API_URL" api_key = "API_KEY" prompt = "Provide titles and a summary of European economic news from the past week." data = { "api_key": api_key, "prompt": prompt, "model": "other_llm_name", "max_tokens": 300, } response = requests.post(api_url, json=data) if response.status_code == 200: response_data = response.json() news_summary = response_data["generated_text"] return news_summary else: raise Exception(f"Failed to get news summary. Status code: {response.status_code}") # Example usage: news_summary = get_european_economy_news() print(news_summary)This code snippet assumes that there's an API provided by the news company's LLM. You would replace "API_URL" and "API_KEY" with the appropriate values for the specific LLM API. The function sends a prompt to the other LLM, which returns the titles and summary of European economic news from the past week. Note that this code will not work in practice as it relies on a hypothetical API, but it serves as a conceptual example of how you might interact with another LLM if such an API existed.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →