loadByDescription

open suspend override fun loadByDescription(description: String, subject: MemorySubject, scope: MemoryScope): List<Fact>(source)

Searches for facts using natural language descriptions. This method enables semantic-based fact retrieval by:

  • Matching against concept descriptions (not just keywords)

  • Using case-insensitive substring matching

  • Supporting natural language queries

Example usage:

// Find facts about coding style
val styleFacts = loadByDescription(
description = "code style rules",
subject = MemorySubject.Project,
scope = MemoryScope.Organization
)

Note: This implementation uses simple substring matching. Future enhancements could include:

  • Semantic similarity matching

  • Fuzzy text matching

  • Natural language understanding

Return

List of facts whose concepts match the description

Parameters

description

Natural language description to search for

subject

Context category to search in (e.g., MACHINE, PROJECT)

scope

Visibility scope to search in (e.g., Agent, Feature)