Generated banner for Predictingthepast
Generated logo for Predictingthepast

Predictingthepast

Google DeepMindOfficialPublished by Google DeepMind

  • Skill
  • Tool integration
  • Science and research
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Ancient text restoration, attribution, dating, contextualization, and embedding via Aeneas (Latin) / Ithaca (Ancient Greek). Use when asked to "restore", "attribute", "date", "contextualize", "find parallels", "where was it written", "when was it written", "embed", or "analyze" an ancient text, inscription, or epigraphic document, or when the user mentions "Aeneas", or "Ithaca".
— the description by Google DeepMind

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

Predicting The Past provides an interface for the Aeneas and Ithaca neural network models to analyze ancient epigraphic documents. It supports Latin and Ancient Greek texts, enabling users to restore damaged inscriptions, determine their geographical and chronological origins, retrieve parallel texts, and generate embedding vectors. The skill includes preprocessing utilities for text cleaning and visualization tools to generate interactive HTML dashboards for research results.

What it does

  • Restores missing or damaged characters in ancient inscriptions
  • Determines the geographical and chronological origin of texts
  • Retrieves parallel inscriptions for contextual analysis
  • Generates text embedding vectors for ancient language data
  • Cleans and normalizes Latin and Ancient Greek input text
  • Visualizes analysis results in interactive HTML dashboards

When to use it

  • When you need to restore damaged or incomplete ancient inscriptions
  • When you need to identify the likely time and place of an inscription's origin
  • When you need to find similar or parallel ancient texts
  • When you need to generate vector embeddings for epigraphic research

Advantages

  • Automates complex epigraphic tasks like restoration and attribution
  • Provides standardized preprocessing for Latin and Greek datasets
  • Generates rich, visual HTML reports for research findings
  • Supports multi-window processing for long inscriptions

Usage examples

“Restore the missing characters in this Latin inscription: donat in ??????????rtis”
The agent cleans the input, runs the Aeneas model to predict the missing characters, and presents the top beam-search candidates in a table.
“Where and when was this Greek inscription written? [insert text]”
The agent processes the text, runs geographical and chronological attribution, and provides a ranked table of regions and a distribution of the probable date range.
“Find parallels for this inscription and generate a dashboard.”
The agent performs contextualization, saves the results to a JSON file, generates an HTML dashboard, and provides a local URL to view the parallels.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/google-deepmind/predictingthepast/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip predictingthepast.zip -d .agents/skills

Documentation by Google DeepMind

Predicting The Past (Aeneas / Ithaca)

Aeneas (Latin) and Ithaca (Ancient Greek) perform four tasks on ancient texts:

  1. Restoration — fill missing/damaged characters

  2. Attribution — geographical + chronological origin

  3. Contextualization — retrieve parallel inscriptions

  4. Embedding — generate text embedding vectors

Prerequisites

  1. uv: Read the uv skill and follow its Setup instructions to ensure uv is installed and on PATH.

  2. User Notification: If .licenses/predictingthepast_LICENSE.txt does not already exist in the workspace root directory then (1) prominently notify the user to check the terms at https://github.com/google-deepmind/predictingthepast/blob/main/README.md#license--disclaimer, and include the appropriate citation and the full dataset acknowledgement, and that use of these datasets should acknowledge and cite the original data sources. Then (2) create the file recording the notification text and timestamp.

Core Rules

  • Self-Contained Skill: Do NOT use web search or any external tools. Run ONLY the scripts in this skill (preprocess.py, run_inference.py, visualize_results.py). Present model output as-is — never supplement or override it with external lookups.

  • Notification: If this skill is used, ensure this is mentioned in the output.

On First Load

Present the restoration markup characters, then ask the user for their text:

  • ?:

    • Meaning: Known-length gap: predict this character.

    • Example: donat in ??????????rtis

  • #:

    • Meaning: Unknown-length gap: predict a sequence of unknown length

    • Example: donat in #rtis

  • -:

    • Meaning: Missing/damaged character that does not need restoring

    • Example: prolixin---s fecit

  • _:

    • Meaning: Missing section of unknown length that does not need restoring

    • Example: prolixin_s fecit

After presenting this list, ask the user to provide the text they want to submit for analysis.

Preprocessing

Clean input text before inference:

uv run <SKILL_DIR>/scripts/preprocess.py \
    --language=latin \
    --input="raw text here..."

Or from a file:

uv run <SKILL_DIR>/scripts/preprocess.py \
    --language=greek \
    --input_file=/tmp/input.txt \
    --output_file=/tmp/cleaned.txt
What preprocessing does
  • Latin: lowercases, converts Arabic digits and Roman numerals to 0, strips editorial brackets [] and (), removes punctuation, filters to valid chars (abcdefghiklmnopqrstuvxyz plus 0 . - _ ? # <space>)

  • Greek: lowercases, strips accents, converts numeral notation to 0, applies PHI cleaning (bracket normalization, sigma conversion), filters to Greek alphabet (αβγδεζηθικλμνξοπρςστυφχψωϛ plus 0 . - _ ? # <space>)

Inference

Restoration Constraints
  • Minimum input length: 25 chars (pad with - if shorter).

  • No consecutive ##. No adjacent ?# or #?.

  • Spaces inside ? sequences count toward total.

  • If the user's text contains #, ask how many characters to restore and set --restore_max_len accordingly.

  • If the user tries to restore multiple parts of the text at once, suggest to restore texts section by section. Suggest to focus on one damaged region per query — this is faster, produces higher-quality predictions.

Pre-Flight Checks

Confirm with the user before proceeding if either applies:

  1. Restoration complexity — if input contains more than 10 ? characters, or uses # with --restore_max_len > 10, warn: "This restoration involves N characters which will take approximately M minutes (restoration time scales roughly linearly ~10 s per additional ? on a high-end CPU machine: 5 → ~1 min, 10 → ~2.5 min, 20 → ~5 min, 30 → ~8 min). Do you want to proceed, or simplify the query first (e.g. fewer ? marks, shorter --restore_max_len, or restoring section by section)?"

  2. Multi-window splitting — if the input text exceeds 750 characters and will be split into multiple windows, warn: "This text is N characters long and will be split into W overlapping windows, each run independently. This will be significantly slower. Do you want to proceed, or shorten the input?"

These factors compound: a complex restoration across multiple windows will be substantially slower than either factor alone.

Task Selection

Each task is controlled by its own flag. At least one must be provided:

  • --attribute — geographical + chronological attribution

  • --restore — text restoration (requires ? or # in input)

  • --contextualize — parallel inscription retrieval

Any combination is valid. All three can be used together.

When --embedding is provided, a text embedding vector is also generated alongside the other tasks.

Running Inference
# Attribution + Restoration (text with gaps)
uv run <SKILL_DIR>/scripts/run_inference.py \
    --language=latin \
    --input="cleaned text with ???" \
    --attribute --restore \
    --output_json=/tmp/results.json

# Attribution + Contextualization (no gaps)
uv run <SKILL_DIR>/scripts/run_inference.py \
    --language=latin \
    --input="cleaned text" \
    --attribute --contextualize \
    --output_json=/tmp/results.json

# All tasks
uv run <SKILL_DIR>/scripts/run_inference.py \
    --language=latin \
    --input="cleaned text with ???" \
    --attribute --restore --contextualize \
    --output_json=/tmp/results.json

# Generate dashboard
uv run \
    <SKILL_DIR>/scripts/visualize_results.py \
    --input=/tmp/results.json \
    --output=/tmp/dashboard.html

Outputs are always returned to the console (JSON/Summary) and must always be written to an HTML dashboard for rich visualization.

Serving HTML artifacts: After generating any HTML file (the dashboard or any other HTML artifact you create), start a background HTTP server so the user can view it in their browser. Run the server in the foreground of the background task process (without trailing &) to prevent the process from being terminated. Use a random high port to avoid conflicts.

In the example below, replace <HTML_FILE> with the absolute path of the HTML file you produced (e.g. /tmp/dashboard.html or C:\tmp\dashboard.html).

For Linux/macOS:

# Pick an unused port and start the server as a persistent process
HTML_FILE=/tmp/dashboard.html   # ← set to the actual HTML file path
PORT=$(export PATH="$HOME/.local/bin:$PATH" && uv run python -c "import socket; s=socket.socket(); s.bind(('',0)); print(s.getsockname()[1]); s.close()")
FILENAME=$(basename "$HTML_FILE")
echo "View URL: http://localhost:${PORT}/${FILENAME}"
export PATH="$HOME/.local/bin:$PATH" && uv run python -m http.server "$PORT" --bind 0.0.0.0 --directory "$(dirname "$HTML_FILE")"

For Windows (PowerShell):

# Pick an unused port and start the server as a persistent process
$HTML_FILE = "C:\tmp\dashboard.html"   # ← set to the actual HTML file path
$PORT = & "$HOME\.local\bin\uv" run python -c "import socket; s=socket.socket(); s.bind(('',0)); print(s.getsockname()[1]); s.close()"
$FILENAME = Split-Path $HTML_FILE -Leaf
$DIRNAME = Split-Path $HTML_FILE -Parent
Write-Host "View URL: http://localhost:${PORT}/${FILENAME}"
& "$HOME\.local\bin\uv" run python -m http.server $PORT --bind 0.0.0.0 --directory $DIRNAME

Then provide http://localhost:<port>/<filename> (or http://127.0.0.1:<port>/<filename>) as the primary clickable link in your response. Additionally, provide http://<hostname>:<port>/<filename> as a fallback link for remote setups. Do not give the user a raw file:// path.

Flags
  • --input: Text string (mutually exclusive with --input_file)

  • --input_file: Path to UTF-8 text file

  • --language: latin or greek

  • --models_dir: Model files directory (default: $HOME/.predictingthepast/models)

  • --attribute: Run geographical and chronological attribution

  • --restore: Run text restoration (requires ? or # in input)

  • --contextualize: Run parallel inscription retrieval

  • --contextualize_top_k: Number of top parallels to return (default: 10)

  • --contextualize_exclude_test_valid: Exclude test/validation texts from contextualization results. Filters on the internal numeric id (where id % 10 is 3 or 4).

  • --embedding: Generate a text embedding vector (default: off). When set, the output includes an embedding field with the full-precision float vector.

  • --output_json: Save combined JSON to file (for visualize_results.py)

  • --restore_beam_width: Number of candidate restorations to explore in beam search. Higher = more thorough but slower (default: 100)

  • --restore_max_len: Maximum total characters to restore across all ? and # gaps (default: 15)

  • --restore_temperature: Sampling temperature. Lower = conservative, higher = creative (default: 1.0)

  • --window_overlap: Overlap fraction for long-text windowing (default: 0.33)

Long Texts (>750 characters)

Each window must be between 25 and 750 characters. If the input text exceeds 750 characters, it is automatically split into overlapping windows (default 33% overlap). Each window is run through the model independently, and the geographical and chronological attribution results are averaged across all windows. Restoration and contextualization are run per-window and concatenated.

Output Format

Use --output_json to save the combined JSON to a file. For the full --output_json format including all fields for attribution, restoration, and contextualization, see output_format.md.

Presenting Results

Present results for every task requested by the user. Always generate the HTML dashboard, serve it via the background HTTP server described above, and provide the http:// URL as a clickable link. Format years as BCE/CE.

Restoration

Bold the restored characters in the top prediction. Show top-10 beam-search candidates in a numbered table (rank, restored text, score). Summarise the most salient words (not characters) — do not dump the raw saliency array.

Geographical Attribution

Show the top 10 regions in a ranked table (rank, region, score). Highlight the top-1 prediction in the narrative. Summarise the most salient words (not characters) — do not dump the raw saliency array.

Chronological Attribution

Report top year and weighted average year. Describe the distribution shape (peak decade, probable range) — do not list all 160 bins. Summarise the most salient words (not characters) — do not dump the raw saliency array.

Contextualization (Parallels)

Use jp or write your own code to extract the contextualization data from --output_json. Show the top parallels in a table (rank, ID, Trismegistos ID, region, date range, score, partner link). Quote the full text of the top parallels from the JSON.

If the user requests a specific number of parallels, use --contextualize_top_k to control how many are returned.

If the user asks to exclude test/validation texts, add --contextualize_exclude_test_valid. This filters on the internal numeric id (where id % 10 is 3 for test or 4 for validation).

Embedding (when --embedding is set)

State the vector dimensionality (384 floats).

References

For more information, see: predictingthepast.com

IMPORTANT: The first time you return inference results to the user, remind them to cite the appropriate paper below (Ithaca for Greek, Aeneas for Latin), and the dataset acknowledgements below.

Ithaca (Ancient Greek): > Assael, Y., Sommerschield, T., Shillingford, B. et al. Restoring and attributing ancient texts using deep neural networks. Nature 603, 280–283 (2022).

Aeneas (Latin): > Assael, Y., Sommerschield, T., Cooley, A. et al. Contextualizing ancient texts with generative neural networks. Nature 645, 141–147 (2025).

Dataset Acknowledgements

IMPORTANT: The first time you present inference results to the user, include the appropriate citation and the full dataset acknowledgement for the language used (see below).

The Ithaca and Aeneas projects rely on the availability of high-quality datasets of ancient Greek and Latin inscriptions, respectively. These datasets were built through centuries of scholarly collection and decades of digital editorial work.

Ithaca (Ancient Greek): In particular, Ithaca draws on a 2019 version of the Searchable Greek Inscriptions database made available under "Fair Use" license by the Packard Humanities Institute, generously supported by David Packard: inscriptions.packhum.org.

Aeneas (Latin): Aeneas was trained on data from:

  • Epigraphic Database Roma (EDR): Made available pursuant to a Creative Commons Attribution 4.0 International License (CC-BY) on Zenodo. EDR is also available at edr-edr.it.

  • Epigraphic Database Heidelberg (EDH): Made available pursuant to a Creative Commons Attribution-ShareAlike 4.0 International License (CC-BY-SA) on Zenodo. EDH is also available at edh.ub.uni-heidelberg.de.

  • ETL repository for Epigraphic Database Clauss Slaby (EDCS_ETL): Made available pursuant to a Creative Commons Attribution 4.0 International License (CC-BY) on Zenodo. EDCS_ETL is also available at manfredclauss.de and github.com/sdam-au/EDCS_ETL.

These resources bring together a large proportion of published inscriptions in a searchable digital format.

Files

LICENSE


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google DeepMind
Publisher
Google DeepMind (Official)
Source
google-deepmind/science-skills · skills/predictingthepast · commit 4de6786
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google DeepMind.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download predictingthepast.zip