R12.3-20260213
Parser Assistant by AI

Parser Assistant by AI is an AI-powered feature that generates visual parser from natural language descriptions to automatically extract structured data from CLI and API outputs. Users can create parser rules with AI’s help, then edit and fine-tune them as needed. The AI operates as a co‑pilot, working alongside users in creating parser rule to enhance efficiency.  

Information Note: The "Use AI Function" privilege is required to use AI assistant in parser. 

The Parser Assistant by AI UI is shown below:

Information Note: The Prompt Input Pane can be dragged vertically to adjust its height and can be collapsed completely until it becomes invisible.

User Flow

To use AI assistant, complete the main steps below:

Step 1: Users input prompt and request

Step 2: AI creates parser rules upon reasoning

Step 3: Users review the patterns created by AI, then save them to Visual Parser.

Key Concepts

Some key concepts are introduced in the table below.

Concept
Description
System Prompt
Basic knowledge and formats of NetBrain Parser pattern and line pattern stored at the backend. System prompt can be refined by NetBrain engineers.
User Prompt

Prompt input by user, saved instructions. Some sample user prompts are listed below:

  • Please parse key information (This can be set as default user prompt).  
  • Parse this table.
  • Please parse the version and each number in uptime as an int variable
Input Text
The whole retrieved sample texts in the parser left pane will be sent to AI to be parsed. The length of the sample text is limited by token. The extra sample texts are trimmed and will not be sent to AI. Note: The maximum size of sample text sent to AI is 100 KB, which is configurable in AI Settings.
AI Response
AI Response records the interaction with AI, including the user prompts, the YAML rule definition, the explanation given by AI. 
AI Pattern
AI returns patterns in YAML format. Each pattern contains a parser rule using Regex syntax. NetBrain automatically converts the regex pattern to standard visual parser pattern.

Parser Rules Supported by AI Parser

AI Parser can generate the following pattern types:

  • Single-variable pattern
  • Paragraph pattern
  • Table pattern: AI generates table pattern directly. Users can edit the table column headers and table settings. .
  • Collector pattern: collector pattern is generated when the sample texts can’t be separated into paragraphs.
  • Paragraph in paragraph: AI can generate a paragraph pattern embedding another paragraph pattern
  • Also, two functions “LinesbyVariable” and "LinesByRegex” are supported in the parser rule created by AI.

AI generates parser patterns in Regular Expression format. However, the system can convert some simple Regex into NetBrain parser pattern format.

No.
NetBrain Standard AI PatternNetBrain Standard Parser Rule Format
1
System image file is "$Image_Filename"System image file is "$Image_Filename"
2
regex[$int:intf_mtu]:MTU (\d+)
MTU $int:intf_mtu