Skip to content

Commit 6c368e2

Browse files
committed
Update research assistant
1 parent f2ac5a5 commit 6c368e2

File tree

1 file changed

+53
-22
lines changed

1 file changed

+53
-22
lines changed

llmstack/contrib/apps/research_assistant.yml

Lines changed: 53 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ categories:
99
- utilities
1010
- research
1111
config:
12-
model: gpt-4o
12+
model: gpt-3.5-turbo
1313
layout: >-
1414
<pa-layout sx='{"maxWidth": "1200px", "margin": "0 auto", "padding": "0",
1515
"height": "100%"}'>
@@ -27,7 +27,8 @@ config:
2727
temperature: 0.7
2828
user_message: >-
2929
Cite all the sources used in the response as a separate paragraph. Answer
30-
the following by visiting at least 3 sources: "{{question.text}}"
30+
the following by visiting multiple sources as needed to generate a high
31+
quality response: "{{question.text}}"
3132
window_color: "#477195"
3233
input_template: <p class="editor-paragraph"><br></p>
3334
system_message: >-
@@ -38,25 +39,32 @@ config:
3839
3940
## You will break down the user's question into multiple sub tasks, perform
4041
each of them before responding. For example, if someone asks what is the
41-
current price of nvda stock, you will break it down into two tasks: 1) find
42-
sources for nvda stock price 2) Pick three relevant URLs from the search
43-
results 3) Visit url1 using open_url and get the data 4) Visit url2 using
44-
open_url and get the data 4) Visit url3 using open_url to get the data 5)
45-
Create an answer from the data extracted from urls and finally 6) Include
46-
sources as citations as the last paragraph
42+
current price of nvda stock, you will break it down into following tasks:
43+
44+
1) Find sources for nvda stock price using web_search
45+
46+
2) Pick some relevant URLs from the search results, visit each one of them
47+
to get data with open_url individually
48+
49+
3) Create an answer from the data extracted from urls and finally
50+
51+
4) Include sources as citations as the last paragraph
52+
53+
## web_search and open_url can only process one request at a time. So make
54+
sure to not generate multiple requests in the same invocation
4755
4856
## If the user's question is not part of your existing knowledge, you MUST
4957
create a search query string and search the internet for results
5058
59+
## If the answer is readily available from web search, you may skip opening
60+
the urls with open_url
61+
5162
## Format the answer into multiple paragraphs with each paragraph no longer
5263
than 100 words
5364
5465
## First paragraph should be a brief introduction about the entity being
5566
discussed
5667
57-
## You MUST use at least three different sources before responding to the
58-
user
59-
6068
6169
Current date is {{ "now" | date: "%Y-%m-%d %H:%M" }}. Now let's think step
6270
by step -
@@ -69,20 +77,43 @@ processors:
6977
- id: web_search
7078
name: Web Search
7179
input:
72-
query: ""
80+
url: "www.google.com/search?q={{query}}"
81+
instructions: [{ "type": "Wait", "selector": "body", "data": "" }]
7382
config:
74-
k: 10
75-
search_engine: Google
76-
advanced_params: ""
83+
timeout: 10
84+
stream_video: true
85+
connection_id: null
86+
tags_to_extract:
87+
- a
7788
description: Search the web for answers
78-
input_fields: []
89+
input_fields:
90+
- name: query
91+
type: string
92+
title: Search Query
93+
required: true
94+
description: Search query to be used
7995
provider_slug: promptly
80-
processor_slug: web_search
96+
processor_slug: static_web_browser
8197
output_template:
82-
markdown: |-
83-
{% for result in results %}
84-
{{result.text}}
85-
{{result.source}}
98+
markdown: >-
99+
{% if content.screenshot %}<pa-asset url="{{content.screenshot}}"
100+
type="image/png"></pa-asset>%}{% else %}<promptly-web-browser-embed
101+
wsUrl="{{session.ws_url}}"></promptly-web-browser-embed>{% endif %}
102+
103+
104+
105+
## Text from the search results page
106+
107+
108+
{{text}}
109+
110+
111+
## Links from the search results page
112+
113+
114+
{% for link in content.links %}
115+
116+
{{ link.url }} - {{ link.text }}
86117
87118
{% endfor %}
88119
- id: open_url
@@ -96,7 +127,7 @@ processors:
96127
stream_video: true
97128
connection_id: null
98129
description: >-
99-
Visit a URL and perform actions. Copy, Wait, Goto and Click are the valid
130+
Visit a URL and perform actions. "Copy", "Wait", "Goto" and "Click" are the only valid
100131
instruction types
101132
input_fields: []
102133
provider_slug: promptly

0 commit comments

Comments
 (0)