Company search
Search across connected company knowledge repositories from Glean to return relevant files, documents, and references for user questions.
Inputs
Configure Company Search in Agent Builder with a natural language query or a fixed query pattern. Set filters and result details to control the content that the agent receives.
| Input or setting | Description | Example |
|---|---|---|
| Search query | Describe the information that the agent needs to locate. | Find the latest onboarding guidance for [[Team name]] |
| Fixed query or template | Provide a precise Glean search query or use variables in a query template. | [[Feature name]] app:jira updated:past_week |
| Filters | Limit results to specific connectors, containers such as folders or collections, or documents. | app:gmail from:me to:"ABC XYZ" |
| Number of results | Select the number of results to return for each search. | 10 |
| Result detail | Select relevant snippets or the full document for each result. | Relevant excerpts |
For detailed search syntax and filter guidance, see Search in Glean and Advanced search filters.
Outputs
Company Search returns ranked search results and adds them to the agent context buffer. The tool does not automatically display these results to the user. Follow Company Search with a Respond step or another downstream step to summarize or extract the relevant information.
Usage examples
- Meeting preparation: Search recent company notes, Salesforce updates, and meeting transcripts to prepare for an upcoming meeting.
- Candidate interview preparation: Search candidate resume uploads and internal interview notes to prepare interview questions.
- Support ticket resolution: Search Confluence playbooks and related internal documentation to solve a support ticket.
Prerequisites
Before using Company Search, complete these prerequisites:
- Connect the sources that contain the required information.
- Ensure that the person running the agent holds access permissions for the target content in the source application.
- Allow newly connected or updated sources time to complete crawling and indexing before expecting content in search results.
Configuration
To add Company Search to an agent:
- Open Agent Builder and select Add step.
- Select Company Search under the By Glean section.
- Enter a natural language query or a fixed query template.
- Configure optional settings such as filters, result limits, and snippet detail levels.
- Add a Respond step or another downstream step to process the search results.
Results and scope
Company Search uses Glean ranking algorithms to return the most relevant results for a query. The tool retrieves a ranked subset of matches rather than scanning every document in a folder or connector. Each step retrieves approximately 10 results by default and supports a maximum of 500 results per step.
To adjust the result scope:
- Increase the result count when relevant information spans multiple documents.
- Combine multiple Company Search steps with targeted queries when one query cannot cover the entire topic.
- Apply filters to limit results to specific connectors, collections, folders, or documents.
Best practices
- Use manual queries for deterministic results: Define exact terms and filters directly instead of relying on AI-generated search queries.
- Apply specific filters: Scope searches narrowly to reduce irrelevant results. Combine filters on different fields as AND conditions, and combine multiple values for the same field as OR conditions.
- Increase result counts for broad coverage: Return more documents to give the agent a larger context pool. Note that higher counts increase processing time and memory consumption.
- Select full document text when snippets lack context: Choose full document text if the agent locates correct documents but produces incomplete answers. Full text uses more tokens and can cause the agent to reach the memory limit.
- Quote multi-word filter values: Enclose filter values that contain spaces in quotation marks, such as organization:"Account Name".
- Use Collections for large document sets: Group documents into a Collection instead of adding individual files as filter sources.
- Add a downstream step: Always follow Company Search with a Respond step or another action step to summarize, extract, or classify the results.
Limitations
- Results include only content that the active user has permission to access in connected sources.
- Company Search provides ranked results rather than an exhaustive inventory of every matching document.
- Content updates and newly connected sources require indexing completion before appearing in results.
- Search quality depends on query specificity, filter selection, and indexed content.
- Large result sets and full document text consume additional agent memory and increase processing time.