sgns::neoswarm::elm::IELM¶
Abstract interface for Expert Language Models. More...
#include <i_elm.hpp>
Inherited by sgns::neoswarm::elm::DomainELM, sgns::neoswarm::elm::GroundingELM, sgns::neoswarm::elm::RoleELM, sgns::neoswarm::elm::SpecialistAdapter, sgns::neoswarm::elm::ToolSupportELM
Public Functions¶
| Name | |
|---|---|
| virtual | ~IELM() =default |
| virtual std::string | GetName() const =0 |
| virtual ELMRole | GetRole() const =0 |
| virtual bool | IsLoaded() const =0 |
| virtual outcome::result< void > | Load(const std::string & model_path) =0 Load the ELM model from disk (if a dedicated model path is configured). |
| virtual outcome::result< std::string > | Process(const std::string & input, const ELMContext & context) =0 Process input through this ELM and return refined output. |
| virtual float | GetConfidence() const Confidence in the last Process() call. |
Protected Attributes¶
| Name | |
|---|---|
| float | m_lastConfidence |
Detailed Description¶
Abstract interface for Expert Language Models.
Each ELM provides a specific cognitive role in a multi-step chain. Implementations are swappable per doc 03 §5.2.1.
Public Functions Documentation¶
function ~IELM¶
function GetName¶
Return: Human-readable name of this ELM.
Reimplemented by: sgns::neoswarm::elm::DomainELM::GetName, sgns::neoswarm::elm::GroundingELM::GetName, sgns::neoswarm::elm::RoleELM::GetName, sgns::neoswarm::elm::SpecialistAdapter::GetName, sgns::neoswarm::elm::ToolSupportELM::GetName
function GetRole¶
Return: The ELM role this instance fulfills.
Reimplemented by: sgns::neoswarm::elm::DomainELM::GetRole, sgns::neoswarm::elm::GroundingELM::GetRole, sgns::neoswarm::elm::RoleELM::GetRole, sgns::neoswarm::elm::SpecialistAdapter::GetRole, sgns::neoswarm::elm::ToolSupportELM::GetRole
function IsLoaded¶
Return: True if the ELM model has been loaded.
Reimplemented by: sgns::neoswarm::elm::DomainELM::IsLoaded, sgns::neoswarm::elm::GroundingELM::IsLoaded, sgns::neoswarm::elm::RoleELM::IsLoaded, sgns::neoswarm::elm::SpecialistAdapter::IsLoaded, sgns::neoswarm::elm::ToolSupportELM::IsLoaded
function Load¶
Load the ELM model from disk (if a dedicated model path is configured).
Parameters:
- model_path Path to the model file (.mnn or similar).
Return: outcome::success or ModelLoadFailed.
Reimplemented by: sgns::neoswarm::elm::DomainELM::Load, sgns::neoswarm::elm::GroundingELM::Load, sgns::neoswarm::elm::RoleELM::Load, sgns::neoswarm::elm::SpecialistAdapter::Load, sgns::neoswarm::elm::ToolSupportELM::Load
function Process¶
virtual outcome::result< std::string > Process(
const std::string & input,
const ELMContext & context
) =0
Process input through this ELM and return refined output.
Parameters:
- input Text to process (typically output of previous chain step).
- context ELM execution context (original task, prior outputs, confidences).
Return: Refined text or InferenceFailed.
Reimplemented by: sgns::neoswarm::elm::DomainELM::Process, sgns::neoswarm::elm::GroundingELM::Process, sgns::neoswarm::elm::RoleELM::Process, sgns::neoswarm::elm::SpecialistAdapter::Process, sgns::neoswarm::elm::ToolSupportELM::Process
function GetConfidence¶
Confidence in the last Process() call.
Return: Confidence score in [0, 1].
Reimplemented by: sgns::neoswarm::elm::GroundingELM::GetConfidence, sgns::neoswarm::elm::SpecialistAdapter::GetConfidence, sgns::neoswarm::elm::ToolSupportELM::GetConfidence
Default implementation returns a protected m_lastConfidence field. RoleELM and DomainELM set this in Process() and inherit the getter. Specialists that use the adapter pattern override for legacy ISpecialist.
Protected Attributes Documentation¶
variable m_lastConfidence¶
Updated on 2026-10-09 at 03:59:42 +0000