🧠 Text2Frappe - Stage 3 Query Generator (FLAN-T5-BASE)

This model is the third stage in the Text2Frappe pipeline, which enables natural language interface to ERPNext by converting questions into executable database queries.


🎯 Task

Text2Text Generation – Prompt-based query formulation.

Given:

  • A detected ERPNext Doctype (from Stage 1),
  • A natural language question,
  • A list of selected relevant fields (from Stage 2),

this model generates a valid Frappe ORM-style query (e.g., frappe.get_all(...)) to retrieve the required data.


🧩 Input Format

Inputs are JSON-style strings containing:

  • doctype: the ERPNext document type.
  • question: the user's question in natural language.
  • fields: a list of relevant field names predicted by Stage 2.

πŸ“₯ Example Input

{
  "doctype": "Purchase Invoice Advance",
  "question": "List the reference types used in advance payments made this month.",
  "fields": ["reference_type"]
}

πŸ“€ Example Output

frappe.get_all('Purchase Invoice Advance', filters={'posting_date': ['between', ['2024-04-01', '2024-04-30']]}, fields=['reference_type'])

Downloads last month
704
Safetensors
Model size
248M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support