Package com.basis.api.admin
Class BBjAdminAIQueryResult
java.lang.Object
com.basis.api.admin.BBjAdminAIQueryResult
- All Implemented Interfaces:
Serializable
The result of a natural-language-to-SQL conversion returned by
BBjAdminAI.buildQuery(String).
Always check isSuccessful() before using
getGeneratedSql().
BBjAdminAIQueryResult result = ai.buildQuery("Show all invoices for ACME Corp");
if (result.isSuccessful()) {
String sql = result.getGeneratedSql();
} else {
System.err.println(result.getErrorMessage());
}
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionHuman-readable error description whenisSuccessful()isfalse.The SQLSELECTstatement generated by the LLM.The original natural-language question provided by the caller.The schema fragment injected into the LLM prompt.Names of the tables the LLM believes are referenced by the generated query.booleanReturnstrueif a SQL statement was successfully generated.toString()
-
Constructor Details
-
BBjAdminAIQueryResult
-
-
Method Details
-
getNaturalLanguageQuery
The original natural-language question provided by the caller. -
getGeneratedSql
-
getTablesReferenced
Names of the tables the LLM believes are referenced by the generated query. May be empty. -
getSchemaContextUsed
The schema fragment injected into the LLM prompt. Useful for debugging RAG retrieval quality. -
isSuccessful
public boolean isSuccessful()Returnstrueif a SQL statement was successfully generated. -
getErrorMessage
-
toString
-