Allow restricting google retrieval by domain (e.g. exclude social media)

Aperta
#76 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@leothomas ci sta già lavorando.

Dal 11/11/2026.

  • #79 di @leothomas — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

A pull request for this work is already open (#79), so the feature appears to be underway. To understand the proposed change, read core/contrust.py and locate SourceRetriever and its Serper query and hit-fetching flow. Done means optional domain filters affect the query and returned hits as described, with included_domains taking precedence and default behavior unchanged.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

The google (Serper) retriever searches the open web, so the best semantic match for an atom can be a source with no editorial or peer-review process. A Facebook group, Reddit thread or Quora answer discussing the topic then enters the Markov network as evidence. We ran into this evaluating science claims for NASA's AKD project.

ConTrust (core/contrust.py) helps by down-weighting low-credibility sources. But unrated domains such as facebook.com get the neutral 0.5 prior, and it can't express hard constraints like "only .gov/.edu sources".

Proposal

Add optional excluded_domains / included_domains to SourceRetriever (google only):

  • Apply them as -site: / site: operators on the Serper query, so filtered domains don't use up result slots.
  • Also filter the returned hits before any page is fetched. This covers cached results and engines that ignore the operator.
  • included_domains wins when both are set. Bare suffixes like gov / edu match any host ending in them.
  • Ship a SOCIAL_MEDIA_DOMAINS constant as a starting blocklist. The default stays None, so behaviour is unchanged unless you opt in.

PR to follow.

Lingua principale
Python
Stelle
45
Fork
14
Merge medio
5h 1m
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IBM/FactReasoner

Tutte le issue di IBM/FactReasoner

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.