Skip to content

out of range eror when calling intrinsics on empty contexts #937

Description

@nrfulton

Code to reproduce:

import mellea
from mellea.stdlib.components.intrinsic.rag import check_answerability

m = mellea.start_session(backend_name="hf", model_id="ibm-granite/granite-4.0-micro")
check_answerability(
    question="Does our firm have any current investments in the foo industry?",
    documents=["The user works for blah capital", "blah capital leads investment round in acme corp", "acme corp is disrupting the foo industry"],
    context=m.ctx,
    backend=m.backend
)

Expected: answerability intrinsic provides a result.

Actual: out of index error when running isinstance(conversation[0], (list, tuple)) or hasattr(conversation[0], "messages") in transformers.tokenization_utils_base

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/adapter-functionsGranite adapter functions: framework and adaptiers including RAG, Guardian, Corearea/backendsProvider-specific work: Ollama, HF, LiteLLM, OpenAI, Bedrock, vLLMarea/stdlibCore abstractions: Context, MOT, SamplingStrategy, formatters, serializationbugSomething isn't workingp2Medium/low: minor bugs, niche features, polish, docs, tests, cleanup. Scoped, lower urgency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions