All Products
Search
Document Center

AI Coding Assistant Lingma:Enhanced enterprise code generation

Last Updated:Sep 23, 2025

Lingma provides retrieval-augmented generation for inline code based on your enterprise code repositories. When developers use Lingma for inline code generation, they can use uploaded enterprise code repositories as context for code completion. This helps the code completion results better align with enterprise code standards and business characteristics.

Important

This feature is only supported for Visual Studio Code and JetBrains IDE plug-in, not available in the Lingma IDE.

Applicable editions

Enterprise Dedicated Edition

Lingma administrators and organization-level global administrators (for the Dedicated Edition) can add or delete code repositories and enable or disable the retrieval-augmented generation feature on the Knowledge management page of the Lingma console.

image

Manage enterprise knowledge bases

Lingma administrators and organization-level global administrators (for the Dedicated Edition) can manage enterprise knowledge bases. This includes creating, editing, or deleting knowledge bases, adding or removing members who can view a knowledge base, and adding or removing code repositories within a knowledge base.

Create, edit, and delete a knowledge base

Create a knowledge base

  1. In the sidebar, click Knowledge management to go to the Knowledge management page.

  2. On the Knowledge management page, click Create knowledge base.

  3. In the Create knowledge base form that appears, enter the following information:

    • Set Application scenario to Inline code generation.

    • Enter a Knowledge base name that is easy to recognize.

    • (Optional) Provide a Description to summarize the content or purpose of the knowledge base.

    • Select the Visibility for the knowledge base. The default is Private, which means the knowledge base is visible only to its members.

  4. After you enter the information, click OK.

  5. After the knowledge base is created, you are returned to the Knowledge management page, where the new knowledge base appears in the list.

image

Edit a knowledge base

You can modify the basic information of a knowledge base, such as its name, description, and visibility, in the following two ways:

  1. From the Knowledge management page: In the knowledge base list, find the knowledge base that you want to edit and click the edit icon to enter edit mode.

  2. From the knowledge base details page: Go to the details page of the knowledge base and click the edit button to enter edit mode.

Delete a knowledge base

Go to the details page of the knowledge base and click the delete button. To confirm the deletion, you must enter the name of the knowledge base.

Important

A deleted knowledge base cannot be recovered. If you need the knowledge base, you must create a new one and add data to it.

Upload a code archive

image

Lingma administrators and organization-level global administrators (for the Dedicated Edition) can manage the data in a knowledge base. The upload procedure is as follows:

  1. Click Add data to go to the Add data page.

  2. The data type is Code. To upload a code archive, click or drag a file to the upload area.

    Take note of the following requirements:

    • Upload one code repository archive at a time.

    • Supported file formats: zip, gz, and tar.gz.

    • The file size cannot exceed 100 MB.

    • The file name cannot exceed 200 characters in length, and only UTF-8 and GBK file encoding are supported.

    • To prevent missing information during information retrieval, we recommend that you use a hierarchical and structured code repository.

  3. After the upload is complete, click Confirm add. The archive then enters the data processing flow.

image

Note

For a code knowledge base, do not use your business system repositories as content. Instead, use common second-party package source code, utility libraries, and similar resources to improve the quality of inline code completion.

Enable or disable retrieval-augmented inline code generation

After the code archive is processed, you can enable retrieval-augmented inline code generation. You can do this in the following two ways:

  1. On the Knowledge management page: In the knowledge base list, find the knowledge base and turn the retrieval-augmented generation switch on or off.

image

  1. On the knowledge base details page: Go to the details page of the knowledge base and turn the retrieval-augmented generation switch on or off.

image

After you enable this feature, when authorized developers use Lingma's inline code generation in an IDE client, Lingma generates code suggestions based on the uploaded code data.

Example scenario

A frontend team typically maintains a unified set of coding standards for its engineers. For example, when developing with ReactJS, there are often clear definitions for best practices. This ensures that Props are written clearly and efficiently and helps avoid poor coding habits.

import React from 'react'

type Props = {
  children:react.reactnode;
}

// bad
const lndex = (props: Props)=> {
  return <>{props.children}</>
}

// bad
const Index<Props>=({ children }) => {
  return <>{children}</>
}

// good
const Index: React.FC<Props> = (props) => {
  return <>{props.children}</>
}

In this scenario, you can use Lingma's enhanced code generation from code repositories. The procedure is as follows:

  1. A Lingma administrator uploads a code archive that complies with the coding standards to the management console. For example, the administrator can upload Ant Design, which is a model for UI design that follows strict React component design standards.

  2. Enable retrieval-augmented inline code generation.

  3. Frontend engineers on the team install and enable Lingma in their IDEs.

  4. When a frontend engineer writes code in the editor, Lingma can generate code suggestions that follow the coding standards from the uploaded code repository, as shown in the following figure:

image

Manage knowledge base visibility

Lingma administrators and organization-level global administrators (for the Dedicated Edition) can change the visibility of an enterprise knowledge base in the following two ways:

  1. Edit the knowledge base to modify its visibility.

  2. Go to the knowledge base details page, click the Visible Members tab, and add or remove members who can view the knowledge base.

image

Note

When the retrieval-augmented generation feature is enabled for a knowledge base, developers in the enterprise can use the `#teamDocs` feature in the IDE for inline code generation. Lingma generates code based on the data from the knowledge bases that are visible to the developer.

View the data processing progress of a code repository

After a code archive is uploaded, the system processes the data for vector persistence. This process converts the code into a format that can be used for retrieval-augmented generation. You can view the data processing progress in the code repository list. The file processing statuses are as follows:

  • Waiting for processing: The system processes uploaded files in order. Files that have not yet been processed are in the queue.

  • Processing: The file is being analyzed and vectorized.

  • Completed: The file has been analyzed and its vector data is persisted.

  • Abnormal: An error occurred during file processing. You can hover over the status marker to view the reason. You can then reprocess or delete the abnormal file.

  • Duplicate file: The file content is a duplicate and will not be processed again. You can delete the duplicate file.

Update a code repository

If a code repository is updated, you can upload the new file by adding data again. The new file is reprocessed after it is uploaded.

Delete a code repository

To handle abnormal, duplicate, or obsolete code repositories, you can click the delete operation to delete a single repository. To perform a batch deletion, you can select multiple repositories in the list and then delete them.