Kizuki
    Preparing search index...

    Function validateConceptReply

    • The guard for concept proposals. The model only gives sentence labels; each label is looked up to get the exact sentence, which is then checked word for word against its passage. A concept is kept only if at least one of its sentences is real, its name is a name (at most MAX_NAME_WORDS words, not a question or a note) made only of words from its section of the material, so it can't state a fact of the model's own, the course does not already have it (even as "definition of …"), and its section has fewer than MAX_MODEL_CONCEPTS_PER_SECTION model concepts. Everything else is dropped and counted.

      Parameters

      • reply: {
            concepts: { name: string; sentences: string[] }[];
            unclear: { sentence: string }[];
        }
      • refs: Map<string, SectionSentenceRef>
      • existingNames: Set<string>
      • perSection: Map<string, number> = ...

        Model concepts already kept per section, from earlier requests for the same material. Updated as concepts are kept.

      Returns { concepts: CheckedConcept[]; dropped: number; unclear: CheckedUnclear[] }