Introduce ContextGenerator for deterministic local KB.