
Overview
The Code Tool capability enables Glean Assistant to understand your organization’s code repositories context, providing:- Contextually relevant search results for software engineers
- Code suggestions that align with organizational standards across applications
- Enhanced debugging capabilities through historical code analysis
- Streamlined feature implementation and development workflows
Key Benefits
When you enable the Code Tool, your development teams gain powerful capabilities that enhance productivity:- Enhanced Code Understanding and Debugging: Developers can quickly understand recent changes that might affect components they’re debugging, allowing faster resolution of errors and bugs.
- Feature Status and Implementation Insights: Teams can discover if features have been implemented, locate exact configuration flags, and access relevant design documents to streamline feature deployment.
- Streamlined Code Implementation: The tool can analyze similar code patterns across your repositories, helping engineers identify which files need modification and suggesting appropriate code changes.
Learn More
Explore Usage Scenarios for the Code Tool in Glean Assistant
Configuration
In most cases, no explicit configuration is needed if your Glean environment meets the base requirements below.Requirements
1
Connect a Code Repository
Ensure that GitHub or GitLab have been connected to Glean as a data source.
2
Crawl & Index the Code Repository
Once connected, GitHub/GitLab content has been fully crawled and indexed by Glean.
3
Complete ML Cycle
One cycle of Machine Learning (ML) has been completed since GitHub/GitLab was connected.
4
Enable Glean Assistant
Glean Assistant has been setup and enabled.
Troubleshooting
If you have linked GitHub or GitLab with Glean and notice that Glean Assistant isn’t conducting code searches or incorporating code in its responses, it is likely that the necessary machine learning workflows, which Glean periodically runs in the background, haven’t been executed on your indexed code yet. Glean runs several ML workflows monthly on your search index to:- Understand organizational synonyms, acronyms, and semantics (including code comprehension)
- Enhance search result relevance and people suggestions
- Enable query suggestions and predictive text
- Train your organization’s unique language model for Glean Chat and Assistant
FAQ
Which datasources are supported?
Which datasources are supported?
Currently, code repositories in GitHub and GitLab are supported.
What permissions are required?
What permissions are required?
The permissions match those of the Glean GitHub and GitLab connectors exactly. If your deployment already has GitHub or GitLab set up, the API usage and permissions required remain the same.
Is code search supported in search results?
Is code search supported in search results?
Currently, indexed code is only used for Glean Assistant responses. Glean Search matches PR descriptions and file names, but not code contents directly, to reduce result noise.
How is my data secured?
How is my data secured?
Code snippets become part of your organization’s Glean Knowledge Graph, ensuring:
- Only users with existing code access can access it via Glean Assistant
- Code snippets follow the same privacy guarantees as all other indexed Glean content
- The security model is consistent with your existing GitHub/GitLab permissions
What code file types are supported?
What code file types are supported?
Glean Assistant searches through code in:
- PR and Merge Request differentials
- Latest commit and Main/Master branch files with extensions including (but not limited to):
- Common languages: .js, .py, .java, .cpp, .go, .rb, .php
- Web technologies: .html, .css, .scss
- Configuration: .ini, .cfg, .cnf
- And many more specialized formats
For a complete list of supported file extensions, please contact Glean support.
What's the setup process for enabling code indexing?
What's the setup process for enabling code indexing?
Setup involves ensuring GitHub/GitLab is enabled for your deployment, activating Glean Assistant, and ensuring a full crawl has been completed. The system will automatically begin indexing code content during regular crawls.