Логотип Counterfactual Analysis

Counterfactual Analysis

Спільнота
MattArtzAnthro
counterfactual-analysis

Test a hypothetical edit against the loaded Gephi graph without changing the real workspace. Use for what-if questions such as removing hubs, adding ties, deleting ties, or comparing structural resilience.

Огляд

ВидавецьMattArtzAnthro
Репозиторійgephi-ai
Назва навичкиcounterfactual-analysis
Зірки
26
Форки
6
Файли в пакеті
Лише інструкції
ЛіцензіяApache-2.0
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Видавець на GitHub: MattArtzAnthro. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Counterfactual Analysis у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/MattArtzAnthro/gephi-ai/tree/main/plugins/gephi-network-analysis/skills/counterfactual-analysis
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MattArtzAnthro/gephi-ai.git /tmp/gephi-ai
mkdir -p .claude/skills
cp -r /tmp/gephi-ai/plugins/gephi-network-analysis/skills/counterfactual-analysis .claude/skills/counterfactual-analysis
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Counterfactual Analysis в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Counterfactual Analysis, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Counterfactual Analysis не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Counterfactual test

Answer the user's what-if question by running it as a real measurement against the graph currently loaded in Gephi, using gephi_whatif. It duplicates the current workspace, applies the edit to the copy, compares the structural profile before and after, then deletes the copy. The real graph is never touched, so this is safe to run repeatedly.

Follow the gephi skill's rules throughout; this workflow repeats only the ones it is most likely to break. Read ../gephi/references/claim-verification.md for removal tests and their comparison node.

Rules this workflow must keep

  • Asking. When a step says to ask, ask once. If the person cannot answer, is away, or asked for a finished product, use the default named in that step and remove or overwrite nothing. At the end, give one short line for each choice that changed the result, under "Choices I made"; leave the section out when every step used its obvious default. If there is no input to work on, stop and say what is needed.
  • Session start. Start with gephi_health_check. Then check which workspace is open (gephi_list_workspaces) and whether a filter is active (filter_active in replies): a filter from an earlier conversation stays on, and exports and checks then see only what it shows.
  • Ranking. To rank nodes on a metric, call gephi_query_nodes with sort_by set to the metric, columns set to the few columns you need, and limit about 10: nodes are ordered before paging, so the first page is the top of the whole graph. Without columns, every attribute of every node comes back and a long listing can overflow.

Steps

  1. Session start: gephi_health_check. If it fails, tell the user to start Gephi and stop. Call gephi_list_workspaces; if filter_active is true, say the test runs on the visible nodes only.

  2. Get the question. If the request does not specify an edit, ask what edit they want to test (one sentence is enough: "what if we removed the top hub?", "what if these two accounts stopped talking?"). Default: remove the single highest-degree node.

  3. Resolve the edit. Turn the plain-language question into gephi_whatif's edit list ({"op": "remove_node", "id": ...}, remove_nodes, add_edge, remove_edge). If the person names nodes by label rather than id ("the top hub", "Alice"), resolve the id first: gephi_query_nodes with column and value or contains for a name, or with the ranking rule for "top hub" (gephi_compute_degree first if the degree column is missing). If the name matches more than one node, ask which one. Default: the match with the highest degree, named in the report.

  4. Run gephi_whatif with the resolved edits. Only pass include_slow: true (which also compares average path length and diameter) if the graph is roughly under 3,000 nodes, the same cost gate as gephi_profile_graph.

  5. Report the difference, not a verdict. gephi_whatif returns measurements, and the framing matters:

    • Lead with the numbers that changed and by how much (components, giant-component share, density, modularity, isolates, path length if computed).
    • This is a hypothesis test, not a conclusion. Say what the change does and does not support, and note the caution that applies to any single sample: a counterfactual on a small or skewed graph, or a single removed node standing in for a whole category, can mislead.
    • Offer a rival reading where one exists (for example, "components jumped because this specific hub is also a cut vertex, not because hubs in general hold the network together. Should I test a second one to check?").
    • Add "Choices I made" only for choices that changed the result.
  6. Remind them nothing changed. The scratch copy is already deleted and they are back on their real graph. If they want to make the edit for real, point them at the direct tool (gephi_remove_node, gephi_add_edge, and so on), which gephi_snapshot and gephi_undo protect.

Поширені запитання

Що робить навичка ШІ Counterfactual Analysis?

Test a hypothetical edit against the loaded Gephi graph without changing the real workspace. Use for what-if questions such as removing hubs, adding ties, deleting ties, or comparing structural resilience.

Навіщо використовувати Counterfactual Analysis у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Counterfactual Analysis — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Counterfactual Analysis у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/MattArtzAnthro/gephi-ai/tree/main/plugins/gephi-network-analysis/skills/counterfactual-analysis. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Counterfactual Analysis?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Counterfactual Analysis?

Зі скількома забажаєте. У TypingMind ви можете використовувати Counterfactual Analysis із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Counterfactual Analysis?

Так. На GitHub цю навичку публікує MattArtzAnthro за ліцензією Apache-2.0. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇