weaviate/weaviate · error

'ask' invalid parameter

Error message

'ask' invalid parameter

What it means

validateAskFn in the ask GraphQL argument provider first asserts the param is *AskParams, then checks the question. The type assertion failure returns ''ask' invalid parameter'. Like error 350 it signals the GraphQL argument was not deserialized into the expected struct — a wiring/registration problem rather than user error.

Source

Thrown at modules/qna-transformers/ask/param.go:43

	Rerank       bool
}

func (n AskParams) GetCertainty() float64 {
	return n.Certainty
}

func (n AskParams) GetDistance() float64 {
	return n.Distance
}

func (n AskParams) SimilarityMetricProvided() bool {
	return n.Certainty != 0 || n.WithDistance
}

func (g *GraphQLArgumentsProvider) validateAskFn(param interface{}) error {
	ask, ok := param.(*AskParams)
	if !ok {
		return errors.New("'ask' invalid parameter")
	}

	if len(ask.Question) == 0 {
		return errors.Errorf("'ask.question' needs to be defined")
	}

	if ask.Certainty != 0 && ask.WithDistance {
		return errors.Errorf(
			"nearText cannot provide both distance and certainty")
	}

	return nil
}

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Deploy core and qna-transformers from the same release
  2. Re-register/rebuild the module so the ask argument provider produces *AskParams
  3. Verify the query goes through the standard GraphQL ask argument (not a custom extension)
  4. If reproducible on matching versions, report as a bug with the query and versions
Defensive patterns

Strategy: type-guard

Validate before calling

// ensure both containers report the same version
// GET /v1/meta -> version and modules list must match expectations

Type guard

func isAskParams(p interface{}) bool {
    _, ok := p.(*AskParams)
    return ok
}

Try / catch

if err := validateAskFn(param); err != nil {
    if err.Error() == "'ask' invalid parameter" {
        // argument deserialization mismatch: rebuild/redeploy module with core
    }
    return err
}

Prevention

When it happens

Trigger: The `ask` GraphQL argument reached the validator as a type other than *AskParams, typically due to module/core version mismatch, custom registration of the argument provider, or an internal bug in argument extraction.

Common situations: Version-skewed deployments of weaviate core and qna-transformers; patched module registries; running a custom module build against stock core.

Related errors


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/4bda810f011c2389. Report an issue: GitHub.