Skip to content

Commit

Permalink
Add a people and company search agent
Browse files Browse the repository at this point in the history
  • Loading branch information
vegito22 committed Nov 15, 2024
1 parent fc39ebd commit 911b0f1
Show file tree
Hide file tree
Showing 2 changed files with 541 additions and 0 deletions.
267 changes: 267 additions & 0 deletions llmstack/contrib/apps/company_search_agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
icon: ""
name: Company Search Agent
config:
model: gpt-4o-mini
layout: >-
<pa-layout sx='{"maxWidth": "1200px", "margin": "0 auto", "padding": "0",
"height": "100%"}'>
<pa-grid container="true" spacing="2" sx='{"height": "100%", "flexDirection": "column"}'>
<pa-grid item="true" xs="12" sx='{"overflow": "auto !important", "flex": "1 1 0 !important", "padding": "0 !important"}'>
<pa-chat-output></pa-chat-output>
</pa-grid>
<pa-grid item="true" xs="12" sx='{"alignSelf": "flex-end", "flex": "0 !important", "width": "100%", "padding": "0 !important"}'>
<pa-input-form clearonsubmit="true"></pa-input-form>
</pa-grid>
</pa-grid>
</pa-layout>
provider: openai
max_steps: 10
temperature: 0.7
user_message: ""
window_color: "#477195"
input_template: ""
system_message: >-
You are Promptly Company SearchGPT, a helpful assistant from Promptly. You
help users find companies given a set of filter conditions from the user.
Filter conditions you accept are
lookalike: When user provided this they are trying to search for company
similar to the one provided in lookalike
industries: A comma Separated list of industries the user is interested in
company_size: The number of employees for companies
keywords: A comma separated list of keywords that are associated with
companies
locations: A comma separated list of locations the company's hq is located
in.
If no user filters are provided add a default filter of companies in
location Milpitas with employee size of 1,10.
You have access to the following tools, use these tools to accomplish the
task.
## Organization Search
- Uses Apollo's database to search for companies that match the filter criteria.
## Web search (web_search2)
- Searches the web for URLs containing realtime information. Only use web
search when you cannot answer from your knowledge. Once the URLs are
available, visit these URLs with static web browser to pull more
information.
## Static web browser (static_web_browser3)
- Access a URL to retrieve information from a web page. Following are the
only valid instruction types for browser input: Click, Type, Wait, Goto,
Copy, Terminate, Enter, Scrollx, Scrolly
Follow the below guidelines while responding to the user:
1. Always Provide your response in JSON only, when responding in JSON format, never wrap your response in ```json <CODE_TEXT>```.
2. Never ask users any follow up questions.
Your response will be used to make an API call, hence the response should
always be a valid response and should adhere to the below schema.
RESPONSE SCHEMA:
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"industry": {
"type": "string"
},
"size": {
"type": "string"
},
"location": {
"type": "string"
},
"domain": {
"type": "string"
},
"linkedin_url": {
"type": "string"
}
},
"required": [
"name",
"description",
"industry",
"size",
"location",
"domain",
"linkedin_url"
]
}
]
}
},
"required": [
"results"
]
}
Now let's think step by step -
assistant_image: ""
welcome_message: ""
chat_history_limit: 0
suggested_messages: []
type_slug: agent
processors:
- id: organization_search1
name: Organization Search
input:
organization_ids: []
q_organization_name: ""
organization_locations: []
organization_not_locations: []
q_organization_keyword_tags: []
organization_num_employees_ranges: []
config:
page: 1
limit: 10
page_size: 19
connection_id: feae386b-1f4c-49cd-a5b4-5623362da374
description: >-
Use the Organization Search tool to find companies in the Apollo database.
organization_num_employees_ranges The number range of employees working
for the company. This enables you to find companies based on headcount.
You can add multiple ranges to expand your search results e.g 1,10.
organization_locations The location of the company headquarters. You can
search across cities, US states, and countries example north america,
california. organization_not_locations Exclude companies from search
results based on the location of the company headquarters. You can use
cities, US states, and countries as locations to exclude. Filter search
results based on keywords associated with companies. For example, you can
enter mining as a value to return only companies that have an association
with the mining industry.
dependencies: []
provider_slug: apollo
processor_slug: organization_search
output_template:
jsonpath: null
markdown: "{{response}}"
- id: web_search2
name: Web Search
input:
query: ""
config:
k: 5
search_engine: Google
advanced_params: ""
description: Search the web for answers
dependencies: []
provider_slug: promptly
processor_slug: web_search
output_template:
jsonpath: $.results
markdown: |-
{% for result in results %}
{{result.text}}
{{result.source}}
{% endfor %}
- id: static_web_browser3
name: Static Web Browser
input:
url: ""
instructions: []
config:
timeout: 10
extract_html: false
stream_video: false
tags_to_extract: []
capture_screenshot: true
capture_session_video: false
description: >-
Visit a URL and perform actions. Copy, Wait, Goto, Enter, Scollx, Scrolly
and Click are the valid instruction types
dependencies: []
provider_slug: promptly
processor_slug: static_web_browser
output_template:
jsonpath: $.text
markdown: >
{% if session %}
### Live Browser Session
<promptly-web-browser-embed
wsUrl="{{session.ws_url}}"></promptly-web-browser-embed>
{% endif %}
{% if videos %}
### Videos
{% for video in videos %}
<pa-asset url="{{video.data}}" type="{{video.mime_type}}"></pa-asset>
{% endfor %}
{% endif %}
{% if content.screenshot %}
### Screenshot
<pa-asset url="{{content.screenshot}}" type="image/png"></pa-asset>
{% endif %}
{{text}}
description: ""
input_fields:
- name: lookalike
type: string
title: Lookalike
required: false
description: Fetch companies similar to lookalike
- name: industries
type: string
title: Industries
required: false
description: Provide Comma Separated list of industries
- name: company_size
type: string
title: Company size
required: true
description: Provide a company size
- name: keywords
type: string
title: Keywords
required: true
description: Provide a comma separated list of keywords to add
- name: location_
type: string
title: "Location "
required: true
description: Provide a comma separated list of locations
output_template:
markdown: "{{agent.content}}"
version: 0
is_published: false
web_config: null
twilio_config: null
slack_config: null
discord_config: null
Loading

0 comments on commit 911b0f1

Please sign in to comment.