AI Discovery: Building Topic Universes with LLM Curation and Wikidata Grounding

A topic universe is a structured plan for a wiki: the topics to cover, how they relate, how deep each should go and in what order to write them. AI Discovery (github.com/jakefearsd/aidiscovery, separate from the Wikantik codebase) is a Java 21, Spring Boot and LangChain4j command-line tool that builds one. An LLM (Anthropic Claude, the default provider, or a local Ollama model) proposes and curates topics, and each suggestion is validated against Wikidata (with Wikipedia as a fallback) so that hallucinated topics are filtered out. It does not compute embeddings or cluster anything: the structure comes from LLM suggestions that a person or an automatic decision rule accepts or rejects.

The saved universe is the input to AI Publisher (see AiPublisherPipeline).


1. Quick-Reference: Two Discovery Modes

ModeCommandBest for
Autonomous ("I Feel Lucky")./ifeellucky.sh "Domain" "Description", or -L "Domain" -d "Description"Quick generation and prototyping; six phases, no prompts
Interactivejava -jar target/aidiscovery.jarFull control; eight phases with accept, reject, defer and modify at each step

The autonomous workflow runs: infer scope from the description, expand topics (up to five rounds, depending on the cost profile), map relationships, analyze coverage gaps, assign priorities, and finalize. The interactive workflow is: seed input, scope setup, topic expansion, relationship mapping, gap analysis, depth calibration, prioritization, review.

2. Automatic Curation

In autonomous mode every suggestion gets a combined score:

combined_score = (relevance * 0.6) + (search_confidence * 0.4)

AUTO_ACCEPT if score >= 0.75 AND search_confidence >= 0.3
AUTO_REJECT if score < 0.4 OR search_confidence < 0.2
ASK_AI      otherwise (borderline cases get an LLM judgement)

Relevance is the LLM's own assessment of the topic against the domain, and search confidence (0.0 to 1.0) comes from matching the topic name against Wikidata labels and aliases: an exact match scores 1.0, a contains match 0.85, and partial word overlaps fall between 0.35 and 0.85.

3. Relationships, Gaps and Priorities

4. Cost Profiles

ProfileTopicsExpansion roundsGap analysis
MINIMAL2-41Skipped
BALANCED9-313Enabled
COMPREHENSIVE25-1505Enabled

Choose one with -c. The convenience script ifeellucky.sh is set up for local Ollama and defaults to COMPREHENSIVE.

5. Output

Universes are saved as ~/.aipublisher/universes/<id>.universe.json. --list, --show <id> and --export <id> <path> manage them, and AI Publisher consumes one with --universe <id>. See ContentPipelineHub for how the pieces connect.