Glean Assistant can be enhanced with code search and generation capabilities to support your development teams and engineers. This guide walks administrators through enabling these features to help development teams leverage Glean Assistant for more efficient coding practices.

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

The Glean Code Tool transforms how your teams interact with your codebase by enabling developers to search, understand, and leverage existing code directly through Glean Assistant.

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

Please reach out to Glean’s support team to request a manual run of these workflows outside of their regular schedule.

FAQ