Full Code of facebookresearch/CRAG for AI

main ad1518887dd4 cached
63 files
2.9 MB
761.1k tokens
253 symbols
1 requests
Download .txt
Showing preview only (3,186K chars total). Download the full file or copy to clipboard to get everything.
Repository: facebookresearch/CRAG
Branch: main
Commit: ad1518887dd4
Files: 63
Total size: 2.9 MB

Directory structure:
gitextract_bmvl_zfa/

├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── data/
│   ├── .gitattributes
│   ├── crag_task_1_and_2_dev_v4.jsonl.bz2
│   ├── crag_task_1_and_2_dev_v5.jsonl.bz2
│   ├── crag_task_3_dev_v4.tar.bz2.part1
│   ├── crag_task_3_dev_v4.tar.bz2.part2
│   ├── crag_task_3_dev_v4.tar.bz2.part3
│   ├── crag_task_3_dev_v4.tar.bz2.part4
│   ├── crag_task_3_dev_v5.tar.bz2.part0
│   ├── crag_task_3_dev_v5.tar.bz2.part1
│   ├── crag_task_3_dev_v5.tar.bz2.part2
│   └── crag_task_3_dev_v5.tar.bz2.part3
├── docs/
│   ├── baselines.md
│   ├── dataset.md
│   └── download_baseline_model_weights.md
├── example_data/
│   └── dev_data.jsonl.bz2
├── local_evaluation.py
├── mock_api/
│   ├── .gitignore
│   ├── README.md
│   ├── apiwrapper/
│   │   ├── example_call.ipynb
│   │   └── pycragapi.py
│   ├── cragapi/
│   │   ├── __init__.py
│   │   ├── fast_bm25.py
│   │   ├── finance.py
│   │   ├── movie.py
│   │   ├── music.py
│   │   ├── open.py
│   │   └── sports.py
│   ├── cragkg/
│   │   ├── .gitattributes
│   │   ├── finance/
│   │   │   └── company_name.dict
│   │   ├── movie/
│   │   │   ├── movie_db.json
│   │   │   ├── person_db.json
│   │   │   └── year_db.json
│   │   ├── music/
│   │   │   ├── artist_dict_simplified.pickle
│   │   │   ├── artist_work_dict.pickle
│   │   │   ├── grammy_df.pickle
│   │   │   ├── rank_dict_hot100.pickle
│   │   │   ├── song_dict_hot100.pickle
│   │   │   └── song_dict_simplified.pickle
│   │   ├── open/
│   │   │   ├── kg.0.jsonl.bz2
│   │   │   └── kg.1.jsonl.bz2
│   │   └── sports/
│   │       └── soccer_team_match_stats.pkl
│   ├── requirements.txt
│   └── server.py
├── models/
│   ├── README.md
│   ├── dummy_model.py
│   ├── rag_knowledge_graph_baseline.py
│   ├── rag_llama_baseline.py
│   ├── user_config.py
│   ├── utils.py
│   └── vanilla_llama_baseline.py
├── prompts/
│   └── templates.py
├── requirements.txt
├── tokenizer/
│   ├── README.md
│   ├── special_tokens_map.json
│   ├── tokenizer.json
│   ├── tokenizer.model
│   └── tokenizer_config.json
└── utils/
    └── cragapi_wrapper.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
.vscode
__pycache__
.DS_Store

================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of Conduct

Meta has adopted a Code of Conduct that we expect project participants to adhere to.
Please read the [full text](https://opensource.fb.com/code-of-conduct/)
so that you can understand what actions will and will not be tolerated.

================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to CRAG
We want to make contributing to this project as easy and transparent as
possible.

## Pull Requests
We actively welcome your pull requests.

1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests.
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes.
5. Make sure your code lints.
6. If you haven't already, complete the Contributor License Agreement ("CLA").

## Contributor License Agreement ("CLA")
In order to accept your pull request, we need you to submit a CLA. You only need
to do this once to work on any of Meta's open source projects.

Complete your CLA here: <https://code.facebook.com/cla>

## Issues
We use GitHub issues to track public bugs. Please ensure your description is
clear and has sufficient instructions to be able to reproduce the issue.

Meta has a [bounty program](https://bugbounty.meta.com/) for the safe
disclosure of security bugs. In those cases, please go through the process
outlined on that page and do not file a public issue.

## Coding Style  
* 4 spaces for indentation rather than tabs
* 120 character line length

## License
By contributing to this project, you agree that your contributions will be licensed
under the LICENSE file in the root directory of this source tree.

================================================
FILE: LICENSE
================================================
Attribution-NonCommercial 4.0 International

=======================================================================

Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.

Using Creative Commons Public Licenses

Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.

     Considerations for licensors: Our public licenses are
     intended for use by those authorized to give the public
     permission to use material in ways otherwise restricted by
     copyright and certain other rights. Our licenses are
     irrevocable. Licensors should read and understand the terms
     and conditions of the license they choose before applying it.
     Licensors should also secure all rights necessary before
     applying our licenses so that the public can reuse the
     material as expected. Licensors should clearly mark any
     material not subject to the license. This includes other CC-
     licensed material, or material used under an exception or
     limitation to copyright. More considerations for licensors:
    wiki.creativecommons.org/Considerations_for_licensors

     Considerations for the public: By using one of our public
     licenses, a licensor grants the public permission to use the
     licensed material under specified terms and conditions. If
     the licensor's permission is not necessary for any reason--for
     example, because of any applicable exception or limitation to
     copyright--then that use is not regulated by the license. Our
     licenses grant only permissions under copyright and certain
     other rights that a licensor has authority to grant. Use of
     the licensed material may still be restricted for other
     reasons, including because others have copyright or other
     rights in the material. A licensor may make special requests,
     such as asking that all changes be marked or described.
     Although not required by our licenses, you are encouraged to
     respect those requests where reasonable. More considerations
     for the public:
    wiki.creativecommons.org/Considerations_for_licensees

=======================================================================

Creative Commons Attribution-NonCommercial 4.0 International Public
License

By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.


Section 1 -- Definitions.

  a. Adapted Material means material subject to Copyright and Similar
     Rights that is derived from or based upon the Licensed Material
     and in which the Licensed Material is translated, altered,
     arranged, transformed, or otherwise modified in a manner requiring
     permission under the Copyright and Similar Rights held by the
     Licensor. For purposes of this Public License, where the Licensed
     Material is a musical work, performance, or sound recording,
     Adapted Material is always produced where the Licensed Material is
     synched in timed relation with a moving image.

  b. Adapter's License means the license You apply to Your Copyright
     and Similar Rights in Your contributions to Adapted Material in
     accordance with the terms and conditions of this Public License.

  c. Copyright and Similar Rights means copyright and/or similar rights
     closely related to copyright including, without limitation,
     performance, broadcast, sound recording, and Sui Generis Database
     Rights, without regard to how the rights are labeled or
     categorized. For purposes of this Public License, the rights
     specified in Section 2(b)(1)-(2) are not Copyright and Similar
     Rights.
  d. Effective Technological Measures means those measures that, in the
     absence of proper authority, may not be circumvented under laws
     fulfilling obligations under Article 11 of the WIPO Copyright
     Treaty adopted on December 20, 1996, and/or similar international
     agreements.

  e. Exceptions and Limitations means fair use, fair dealing, and/or
     any other exception or limitation to Copyright and Similar Rights
     that applies to Your use of the Licensed Material.

  f. Licensed Material means the artistic or literary work, database,
     or other material to which the Licensor applied this Public
     License.

  g. Licensed Rights means the rights granted to You subject to the
     terms and conditions of this Public License, which are limited to
     all Copyright and Similar Rights that apply to Your use of the
     Licensed Material and that the Licensor has authority to license.

  h. Licensor means the individual(s) or entity(ies) granting rights
     under this Public License.

  i. NonCommercial means not primarily intended for or directed towards
     commercial advantage or monetary compensation. For purposes of
     this Public License, the exchange of the Licensed Material for
     other material subject to Copyright and Similar Rights by digital
     file-sharing or similar means is NonCommercial provided there is
     no payment of monetary compensation in connection with the
     exchange.

  j. Share means to provide material to the public by any means or
     process that requires permission under the Licensed Rights, such
     as reproduction, public display, public performance, distribution,
     dissemination, communication, or importation, and to make material
     available to the public including in ways that members of the
     public may access the material from a place and at a time
     individually chosen by them.

  k. Sui Generis Database Rights means rights other than copyright
     resulting from Directive 96/9/EC of the European Parliament and of
     the Council of 11 March 1996 on the legal protection of databases,
     as amended and/or succeeded, as well as other essentially
     equivalent rights anywhere in the world.

  l. You means the individual or entity exercising the Licensed Rights
     under this Public License. Your has a corresponding meaning.


Section 2 -- Scope.

  a. License grant.

       1. Subject to the terms and conditions of this Public License,
          the Licensor hereby grants You a worldwide, royalty-free,
          non-sublicensable, non-exclusive, irrevocable license to
          exercise the Licensed Rights in the Licensed Material to:

            a. reproduce and Share the Licensed Material, in whole or
               in part, for NonCommercial purposes only; and

            b. produce, reproduce, and Share Adapted Material for
               NonCommercial purposes only.

       2. Exceptions and Limitations. For the avoidance of doubt, where
          Exceptions and Limitations apply to Your use, this Public
          License does not apply, and You do not need to comply with
          its terms and conditions.

       3. Term. The term of this Public License is specified in Section
          6(a).

       4. Media and formats; technical modifications allowed. The
          Licensor authorizes You to exercise the Licensed Rights in
          all media and formats whether now known or hereafter created,
          and to make technical modifications necessary to do so. The
          Licensor waives and/or agrees not to assert any right or
          authority to forbid You from making technical modifications
          necessary to exercise the Licensed Rights, including
          technical modifications necessary to circumvent Effective
          Technological Measures. For purposes of this Public License,
          simply making modifications authorized by this Section 2(a)
          (4) never produces Adapted Material.

       5. Downstream recipients.

            a. Offer from the Licensor -- Licensed Material. Every
               recipient of the Licensed Material automatically
               receives an offer from the Licensor to exercise the
               Licensed Rights under the terms and conditions of this
               Public License.

            b. No downstream restrictions. You may not offer or impose
               any additional or different terms or conditions on, or
               apply any Effective Technological Measures to, the
               Licensed Material if doing so restricts exercise of the
               Licensed Rights by any recipient of the Licensed
               Material.

       6. No endorsement. Nothing in this Public License constitutes or
          may be construed as permission to assert or imply that You
          are, or that Your use of the Licensed Material is, connected
          with, or sponsored, endorsed, or granted official status by,
          the Licensor or others designated to receive attribution as
          provided in Section 3(a)(1)(A)(i).

  b. Other rights.

       1. Moral rights, such as the right of integrity, are not
          licensed under this Public License, nor are publicity,
          privacy, and/or other similar personality rights; however, to
          the extent possible, the Licensor waives and/or agrees not to
          assert any such rights held by the Licensor to the limited
          extent necessary to allow You to exercise the Licensed
          Rights, but not otherwise.

       2. Patent and trademark rights are not licensed under this
          Public License.

       3. To the extent possible, the Licensor waives any right to
          collect royalties from You for the exercise of the Licensed
          Rights, whether directly or through a collecting society
          under any voluntary or waivable statutory or compulsory
          licensing scheme. In all other cases the Licensor expressly
          reserves any right to collect such royalties, including when
          the Licensed Material is used other than for NonCommercial
          purposes.


Section 3 -- License Conditions.

Your exercise of the Licensed Rights is expressly made subject to the
following conditions.

  a. Attribution.

       1. If You Share the Licensed Material (including in modified
          form), You must:

            a. retain the following if it is supplied by the Licensor
               with the Licensed Material:

                 i. identification of the creator(s) of the Licensed
                    Material and any others designated to receive
                    attribution, in any reasonable manner requested by
                    the Licensor (including by pseudonym if
                    designated);

                ii. a copyright notice;

               iii. a notice that refers to this Public License;

                iv. a notice that refers to the disclaimer of
                    warranties;

                 v. a URI or hyperlink to the Licensed Material to the
                    extent reasonably practicable;

            b. indicate if You modified the Licensed Material and
               retain an indication of any previous modifications; and

            c. indicate the Licensed Material is licensed under this
               Public License, and include the text of, or the URI or
               hyperlink to, this Public License.

       2. You may satisfy the conditions in Section 3(a)(1) in any
          reasonable manner based on the medium, means, and context in
          which You Share the Licensed Material. For example, it may be
          reasonable to satisfy the conditions by providing a URI or
          hyperlink to a resource that includes the required
          information.

       3. If requested by the Licensor, You must remove any of the
          information required by Section 3(a)(1)(A) to the extent
          reasonably practicable.

       4. If You Share Adapted Material You produce, the Adapter's
          License You apply must not prevent recipients of the Adapted
          Material from complying with this Public License.


Section 4 -- Sui Generis Database Rights.

Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:

  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
     to extract, reuse, reproduce, and Share all or a substantial
     portion of the contents of the database for NonCommercial purposes
     only;

  b. if You include all or a substantial portion of the database
     contents in a database in which You have Sui Generis Database
     Rights, then the database in which You have Sui Generis Database
     Rights (but not its individual contents) is Adapted Material; and

  c. You must comply with the conditions in Section 3(a) if You Share
     all or a substantial portion of the contents of the database.

For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.


Section 5 -- Disclaimer of Warranties and Limitation of Liability.

  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.

  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.

  c. The disclaimer of warranties and limitation of liability provided
     above shall be interpreted in a manner that, to the extent
     possible, most closely approximates an absolute disclaimer and
     waiver of all liability.


Section 6 -- Term and Termination.

  a. This Public License applies for the term of the Copyright and
     Similar Rights licensed here. However, if You fail to comply with
     this Public License, then Your rights under this Public License
     terminate automatically.

  b. Where Your right to use the Licensed Material has terminated under
     Section 6(a), it reinstates:

       1. automatically as of the date the violation is cured, provided
          it is cured within 30 days of Your discovery of the
          violation; or

       2. upon express reinstatement by the Licensor.

     For the avoidance of doubt, this Section 6(b) does not affect any
     right the Licensor may have to seek remedies for Your violations
     of this Public License.

  c. For the avoidance of doubt, the Licensor may also offer the
     Licensed Material under separate terms or conditions or stop
     distributing the Licensed Material at any time; however, doing so
     will not terminate this Public License.

  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
     License.


Section 7 -- Other Terms and Conditions.

  a. The Licensor shall not be bound by any additional or different
     terms or conditions communicated by You unless expressly agreed.

  b. Any arrangements, understandings, or agreements regarding the
     Licensed Material not stated herein are separate from and
     independent of the terms and conditions of this Public License.


Section 8 -- Interpretation.

  a. For the avoidance of doubt, this Public License does not, and
     shall not be interpreted to, reduce, limit, restrict, or impose
     conditions on any use of the Licensed Material that could lawfully
     be made without permission under this Public License.

  b. To the extent possible, if any provision of this Public License is
     deemed unenforceable, it shall be automatically reformed to the
     minimum extent necessary to make it enforceable. If the provision
     cannot be reformed, it shall be severed from this Public License
     without affecting the enforceability of the remaining terms and
     conditions.

  c. No term or condition of this Public License will be waived and no
     failure to comply consented to unless expressly agreed to by the
     Licensor.

  d. Nothing in this Public License constitutes or may be interpreted
     as a limitation upon, or waiver of, any privileges and immunities
     that apply to the Licensor or You, including from the legal
     processes of any jurisdiction or authority.

=======================================================================

Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.

Creative Commons may be contacted at creativecommons.org.


================================================
FILE: README.md
================================================
# CRAG: Comprehensive RAG Benchmark

The Comprehensive RAG Benchmark (CRAG) is a rich and comprehensive factual question answering benchmark designed to advance research in RAG. Besides question-answer pairs, CRAG provides mock APIs to simulate web and knowledge graph search. CRAG is designed to encapsulate a diverse array of questions across five domains and eight question categories, reflecting varied entity popularity from popular to long-tail, and temporal dynamisms ranging from years to seconds.

This repository is migrated from [meta-comprehensive-rag-benchmark-kdd-cup-2024](https://gitlab.aicrowd.com/aicrowd/challenges/meta-comprehensive-rag-benchmark-kdd-cup-2024).

## 📊 Dataset and Mock APIs

Please find more details about the CRAG dataset (download, schema, etc.) in [docs/dataset.md](docs/dataset.md) and mock APIs in [mock_api](mock_api).


## 📏 Evaluation Metrics
RAG systems are evaluated using a scoring method that measures response quality to questions in the evaluation set. Responses are rated as perfect, acceptable, missing, or incorrect:

- Perfect: The response correctly answers the user question and contains no hallucinated content.

- Acceptable: The response provides a useful answer to the user question, but may contain minor errors that do not harm the usefulness of the answer.

- Missing: The answer does not provide the requested information. Such as “I don’t know”, “I’m sorry I can’t find …” or similar sentences without providing a concrete answer to the question.

- Incorrect: The response provides wrong or irrelevant information to answer the user question


Auto-evaluation: 
- Automatic evaluation employs rule-based matching and LLM assessment to check answer correctness. It will assign three scores: correct (1 point), missing (0 points), and incorrect (-1 point).


Please refer to [local_evaluation.py](local_evaluation.py) for more details on how the evaluation was implemented.

## ✍️ How to run end-to-end evaluation?
1. **Install** specific dependencies
    ```bash
    pip install -r requirements.txt
    ```

2. Please follow the instructions in [models/README.md](models/README.md) for instructions and examples on how to write your own models.

3. After writing your own model(s), update [models/user_config.py](models/user_config.py)

   For example, in models/user_config.py, specify InstructModel to call llama3-8b-instruct model
   ```bash
   from models.vanilla_llama_baseline import InstructModel 
   UserModel = InstructModel

   ```

4. Test your model locally using `python local_evaluation.py`. This script will run answer generation and auto-evaluation.


## 🏁 Baselines
We include three baselines for demonstration purposes, and you can read more about them in [docs/baselines.md](docs/baselines.md).


## Citations

```
@article{yang2024crag,
      title={CRAG -- Comprehensive RAG Benchmark}, 
      author={Xiao Yang and Kai Sun and Hao Xin and Yushi Sun and Nikita Bhalla and Xiangsen Chen and Sajal Choudhary and Rongze Daniel Gui and Ziran Will Jiang and Ziyu Jiang and Lingkun Kong and Brian Moran and Jiaqi Wang and Yifan Ethan Xu and An Yan and Chenyu Yang and Eting Yuan and Hanwen Zha and Nan Tang and Lei Chen and Nicolas Scheffer and Yue Liu and Nirav Shah and Rakesh Wanga and Anuj Kumar and Wen-tau Yih and Xin Luna Dong},
      year={2024},
      journal={arXiv preprint arXiv:2406.04744},
      url={https://arxiv.org/abs/2406.04744}
}
```

## License

This project is licensed under the [Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)](LICENSE). This license permits sharing and adapting the work, provided it's not used for commercial purposes and appropriate credit is given. For a quick overview, visit [Creative Commons License](https://creativecommons.org/licenses/by-nc/4.0/).


================================================
FILE: data/.gitattributes
================================================
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.bz2.part* filter=lfs diff=lfs merge=lfs -text


================================================
FILE: data/crag_task_1_and_2_dev_v4.jsonl.bz2
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:afa29f2b3facfb5d15aa9cded00d5ec90ff76f3e67279e7b99cfe86659a641ca
size 739384484


================================================
FILE: data/crag_task_1_and_2_dev_v5.jsonl.bz2
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:d4c14897d8ea2f450a24e098b595d8247c6575f996f9869d6f27a020fe020618
size 739310088


================================================
FILE: data/crag_task_3_dev_v4.tar.bz2.part1
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:3a3f642643adc427b356b34fd078ba867c3905aa4341fc181457197aee9a55cf
size 2097152000


================================================
FILE: data/crag_task_3_dev_v4.tar.bz2.part2
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:abd76c029079b93065aba7fb4fc0e129a803de7ee0e1511432d0037d1782aa7c
size 2097152000


================================================
FILE: data/crag_task_3_dev_v4.tar.bz2.part3
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:d82e3c94e29a361635ed6b56797747b77ef3cf07dc454736d661461f32c23dab
size 2097152000


================================================
FILE: data/crag_task_3_dev_v4.tar.bz2.part4
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:ed48b1ca55606a7d22be4809b10d7de0251d429f01e689a066c6def2428995ad
size 1432877269


================================================
FILE: data/crag_task_3_dev_v5.tar.bz2.part0
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:0220e4b43356ff32a00f35647a4cb375301773c7e66a48daf9329781fdfec3d7
size 2147483648


================================================
FILE: data/crag_task_3_dev_v5.tar.bz2.part1
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:9628e5f24bb4273afbdc380c13c68533fc5e5e788e00a973a7e2765566161330
size 2147483648


================================================
FILE: data/crag_task_3_dev_v5.tar.bz2.part2
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:533bb48a5bed3818262edd02219eff351493a2f35a276958d62b9614257471f5
size 2147483648


================================================
FILE: data/crag_task_3_dev_v5.tar.bz2.part3
================================================
version https://git-lfs.github.com/spec/v1
oid sha256:cc8c4b0224a3d1512283433ed6418c2a4f633dfab98f76ef4acd38fd63b26464
size 1283117287


================================================
FILE: docs/baselines.md
================================================
# CRAG Baselines

For the CRAG benchmark, we provide users with three baseline models to help get started. Detailed implementations of these baseline models are accessible through the links provided below. Refer to [this page](download_baseline_model_weights.md) for steps to download (and check in) the models weights required for the baseline models.


## Available Baseline Models:

1. [**Vanilla Llama 3 Model**](../models/vanilla_llama_baseline.py): For an implementation guide and further details, refer to the Vanilla Llama 3 model inline documentation [here](../models/vanilla_llama_baseline.py).

2. [**RAG Baseline Model**](../models/rag_llama_baseline.py): For an implementation guide and further details, refer to the RAG Baseline model inline documentation [here](../models/rag_llama_baseline.py).

3. [**RAG Knowledge Graph Baseline Model**](../models/rag_knowledge_graph_baseline.py): For an implementation guide and further details, refer to the RAG Baseline model inline documentation [here](../models/rag_knowledge_graph_baseline.py).



================================================
FILE: docs/dataset.md
================================================
# CRAG Dataset Documentation

## Overview

The CRAG dataset is designed to support the development and evaluation of Retrieval-Augmented Generation (RAG) models. It consists of two main types of data:

1. **Question Answering Pairs:** Pairs of questions and their corresponding answers.
2. **Retrieval Contents:** Contents for information retrieval to support answer generation.

Retrieval contents are divided into two types to simulate practical scenarios for RAG:

1. **Web Search Results:** For each question, up to `50` **full HTML pages** are stored, retrieved using the question text as a search query. For Task 1 & 2, `5 pages` are **randomly selected** from the `top-10 pages`. These pages are likely relevant to the question, but relevance is not guaranteed.
2. **Mock KGs and APIs:** The Mock API is designed to mimic real-world **Knowledge Graphs (KGs)** or **API searches**. Given some input parameters, they output relevant results, which may or may not be helpful in answering the user's question.

## Download CRAG Data

- **Task #1:** [QA Pairs & Retrieval Contents](https://github.com/facebookresearch/CRAG/raw/refs/heads/main/data/crag_task_1_and_2_dev_v4.jsonl.bz2?download=)
- **Task #2:** [QA Pairs & Retrieval Contents](https://github.com/facebookresearch/CRAG/raw/refs/heads/main/data/crag_task_1_and_2_dev_v4.jsonl.bz2?download=), [Mock KGs and APIs](/mock_api)
- **Task #3:** QA Pairs & Retrieval Contents (download part [1](https://github.com/facebookresearch/CRAG/raw/refs/heads/main/data/crag_task_3_dev_v4.tar.bz2.part1?download=), [2](https://github.com/facebookresearch/CRAG/raw/refs/heads/main/data/crag_task_3_dev_v4.tar.bz2.part2?download=), [3](https://github.com/facebookresearch/CRAG/raw/refs/heads/main/data/crag_task_3_dev_v4.tar.bz2.part3?download=), and [4](https://github.com/facebookresearch/CRAG/raw/refs/heads/main/data/crag_task_3_dev_v4.tar.bz2.part4?download=); then merge them by `cat crag_task_3_dev_v4.tar.bz2.part* > crag_task_3_dev_v4.tar.bz2`), [Mock KGs and APIs](/mock_api)

## Data Schema

| Field Name             | Type          | Description                                                                                                                                                           |
|------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `interaction_id`       | string        | A unique identifier for each example.                                                                                                                                |
| `query_time`           | string        | Date and time when the query and the web search occurred.                                                                                                            |
| `domain`               | string        | Domain label for the query. Possible values: "finance", "music", "movie", "sports", "open". "Open" includes any factual queries not among the previous four domains. |
| `question_type`        | string        | Type label about the query. Possible values include: "simple", "simple_w_condition", "comparison", "aggregation", "set", "false_premise", "post-processing", "multi-hop".      |
| `static_or_dynamic`    | string        | Indicates whether the answer to a question changes and the expected rate of change. Possible values: "static", "slow-changing", "fast-changing", and "real-time".    |
| `query`                | string        | The question for RAG to answer.                                                                                                                                       |
| `answer`               | string        | The gold standard answer to the question.                                                                                                                             |
| `alt_ans`  | list        | Other valid gold standard answers to the question.                                                                                                                    |
| `split`                | integer       | Data split indicator, where 0 is for validation and 1 is for the public test.                                                                                         |
| `popularity`                | string       | Popularity category of the entity mentioned in the question, with "head", "torso" and "tail" corresponding to the top, middle, and bottom popularity. We defined popularity based on heuristics for each entity type and created a roughly equal number of questions for each bucket. All questions with popularity labels non-empty are Knowledge Graph (KG) questions - questions with answers coming from the KG. When popularity is an empty string, it means the answer to the question comes from the web.
| `search_results`       | list of JSON  | Contains up to `k` HTML pages for each query (`k=5` for Task #1 and `k=50` for Task #3), including page name, URL, snippet, full HTML, and last modified time.         |

### Search Results Detail

| Key                  | Type   | Description                                             |
|----------------------|--------|---------------------------------------------------------|
| `page_name`          | string | The name of the webpage.                                |
| `page_url`           | string | The URL of the webpage.                                 |
| `page_snippet`       | string | A short paragraph describing the major content of the page. |
| `page_result`        | string | The full HTML of the webpage.                           |
| `page_last_modified` | string | The time when the page was last modified.               |


================================================
FILE: docs/download_baseline_model_weights.md
================================================
### Setting Up and Downloading Baseline Model weights with Hugging Face

This guide outlines the steps to download (and check in) the models weights required for the baseline models.
We will focus on the `Meta-Llama-3-8B-Instruct` and `all-MiniLM-L6-v2` models.
But the steps should work equally well for any other models on hugging face. 

#### Preliminary Steps:

1. **Install the Hugging Face Hub Package**:
   
   Begin by installing the `huggingface_hub` package, which includes the `hf_transfer` utility, by running the following command in your terminal:

   ```bash
   pip install huggingface_hub[hf_transfer]
   ```

2. **Accept the Llama Terms**:
   
   You must accept the Llama model's terms of use by visiting: [meta-llama/Meta-Llama-3-8B-Instruct Terms](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct).

3. **Create a Hugging Face CLI Token**:
   
   Generate a CLI token by navigating to: [Hugging Face Token Settings](https://huggingface.co/settings/tokens). You will need this token for authentication.

#### Hugging Face Authentication:

1. **Login via CLI**:
   
   Authenticate yourself with the Hugging Face CLI using the token created in the previous step. Run:

   ```bash
   huggingface-cli login
   ```

   When prompted, enter the token.

#### Model Downloads:

1. **Download LLaMA-2-7b Model**:

   Execute the following command to download the `Meta-Llama-3-8B-Instruct` model to a local subdirectory. This command excludes unnecessary files to save space:

   ```bash
   HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download \
       meta-llama/Meta-Llama-3-8B-Instruct \
       --local-dir-use-symlinks False \
       --local-dir models/meta-llama/Meta-Llama-3-8B-Instruct \
       --exclude *.pth # These are alternates to the safetensors hence not needed
   ```

3. **Download MiniLM-L6-v2 Model (for sentence embeddings)**:

   Similarly, download the `sentence-transformers/all-MiniLM-L6-v2` model using the following command:

   ```bash
   HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download \
      sentence-transformers/all-MiniLM-L6-v2 \
       --local-dir-use-symlinks False \
       --local-dir models/sentence-transformers/all-MiniLM-L6-v2 \
       --exclude *.bin *.h5 *.ot # These are alternates to the safetensors hence not needed
   ```


================================================
FILE: local_evaluation.py
================================================
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

import bz2
import json
import os
import re
from datetime import datetime

from loguru import logger
from openai import APIConnectionError, OpenAI, RateLimitError
from prompts.templates import IN_CONTEXT_EXAMPLES, INSTRUCTIONS
from tqdm.auto import tqdm
from transformers import LlamaTokenizerFast
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig

tokenizer = LlamaTokenizerFast.from_pretrained("tokenizer")


def load_json_file(file_path):
    """Load and return the content of a JSON file."""
    logger.info(f"Loading JSON from {file_path}")
    with open(file_path) as f:
        return json.load(f)


def get_system_message():
    """Returns the system message containing instructions and in context examples."""
    return INSTRUCTIONS + "\n" + IN_CONTEXT_EXAMPLES


def attempt_api_call(client, model_name, messages, max_retries=10):
    """Attempt an API call with retries upon encountering specific errors."""
    # todo: add default response when all efforts fail
    for attempt in range(max_retries):
        try:
            response = client.chat.completions.create(
                model=model_name,
                messages=messages,
                response_format={"type": "json_object"},
                temperature=0.0,
            )
            return response.choices[0].message.content
        except (APIConnectionError, RateLimitError):
            logger.warning(f"API call failed on attempt {attempt + 1}, retrying...")
        except Exception as e:
            logger.error(f"Unexpected error: {e}")
            break
    return None


def log_response(messages, response, output_directory="api_responses"):
    """Save the response from the API to a file."""
    os.makedirs(output_directory, exist_ok=True)
    file_name = datetime.now().strftime("%d-%m-%Y-%H-%M-%S.json")
    file_path = os.path.join(output_directory, file_name)
    with open(file_path, "w") as f:
        json.dump({"messages": messages, "response": response}, f)


def parse_response(response: str):
    """
    Return a tuple of (explanation, score) from the response, 
    where score is 0 if the prediction is wrong, 1 if the prediction is correct.

    Need to handle
    Corner case 1:
        {"explanation": ...}
        Wait, no! I made a mistake. The prediction does not exactly match the ground truth. ...
        {...}

    Corner case 2:
        {"score": 0, "explanation": "The prediction does not contain item, nick "goose" bradshaw, that is in the ground truth."}
        return a tuple of (explanation, score)
    """
    matches = re.findall(r"{([^}]*)}", response)
    text = ""
    for match in matches:
        text = "{" + match + "}"
    try:
        score = -1
        # Pattern to match the score
        score_pattern = r'"score"\s*:\s*(\d+)'
        score_match = re.search(score_pattern, text)
        if score_match:
            score = int(score_match.group(1))
            if score != 0 and score != 1:
                raise Exception("bad score: " + response)
        else:
            return "Parse Err: Score not found", -1

        # Pattern to match the explanation
        explanation_pattern = r'"explanation"\s*:\s*"(.+)"'
        explanation_match = re.search(explanation_pattern, text)
        if explanation_match:
            explanation = explanation_match.group(1)
            return explanation, score
        else:
            return text, score
    except Exception as e:
        print(f"Parsing Error with resp: {response}")
        print(f"Error: {e}")
        return response, -1


def trim_predictions_to_max_token_length(prediction):
    """Trims prediction output to 75 tokens using Llama2 tokenizer"""
    max_token_length = 75
    tokenized_prediction = tokenizer.encode(prediction)
    trimmed_tokenized_prediction = tokenized_prediction[1 : max_token_length + 1]
    trimmed_prediction = tokenizer.decode(trimmed_tokenized_prediction)
    return trimmed_prediction


def load_data_in_batches(dataset_path, batch_size):
    """
    Generator function that reads data from a compressed file and yields batches of data.
    Each batch is a dictionary containing lists of interaction_ids, queries, search results, query times, and answers.
    
    Args:
    dataset_path (str): Path to the dataset file.
    batch_size (int): Number of data items in each batch.
    
    Yields:
    dict: A batch of data.
    """
    def initialize_batch():
        """ Helper function to create an empty batch. """
        return {"interaction_id": [], "query": [], "search_results": [], "query_time": [], "answer": []}

    try:
        with bz2.open(dataset_path, "rt") as file:
            batch = initialize_batch()
            for line in file:
                try:
                    item = json.loads(line)
                    for key in batch:
                        batch[key].append(item[key])
                    
                    if len(batch["query"]) == batch_size:
                        yield batch
                        batch = initialize_batch()
                except json.JSONDecodeError:
                    logger.warn("Warning: Failed to decode a line.")
            # Yield any remaining data as the last batch
            if batch["query"]:
                yield batch
    except FileNotFoundError as e:
        logger.error(f"Error: The file {dataset_path} was not found.")
        raise e
    except IOError as e:
        logger.error(f"Error: An error occurred while reading the file {dataset_path}.")
        raise e



def generate_predictions(dataset_path, participant_model):
    """
    Processes batches of data from a dataset to generate predictions using a model.
    
    Args:
    dataset_path (str): Path to the dataset.
    participant_model (object): UserModel that provides `get_batch_size()` and `batch_generate_answer()` interfaces.
    
    Returns:
    tuple: A tuple containing lists of queries, ground truths, and predictions.
    """
    queries, ground_truths, predictions = [], [], []
    batch_size = participant_model.get_batch_size()

    for batch in tqdm(load_data_in_batches(dataset_path, batch_size), desc="Generating predictions"):
        batch_ground_truths = batch.pop("answer")  # Remove answers from batch and store them
        batch_predictions = participant_model.batch_generate_answer(batch)
        
        queries.extend(batch["query"])
        ground_truths.extend(batch_ground_truths)
        predictions.extend(batch_predictions)
    
    return queries, ground_truths, predictions


def evaluate_predictions(queries, ground_truths_list, predictions, evaluation_model_name):
    """
    Evaluates the predictions generated by a model against ground truth answers.
    
    Args:
    queries (List[str]): List of queries.
    ground_truths_list (List[List[str]]): List of lists of ground truth answers. 
        Note each query can have multiple ground truth answers.
    predictions (list): List of predictions generated by the model.
    evaluation_model_name (str): Name of the evaluation model.
    
    Returns:
    dict: A dictionary containing evaluation results.
    """

    if "chat" in evaluation_model_name.lower():
        # now we are using chatgpt
        openai_client = OpenAI()
        n_miss, n_correct = 0, 0
        system_message = get_system_message()

        for _idx, prediction in enumerate(tqdm(
            predictions, total=len(predictions), desc="Evaluating Predictions"
        )):
            query = queries[_idx]
            ground_truths = ground_truths_list[_idx].strip()
            # trim prediction to 75 tokens using Llama2 tokenizer
            prediction = trim_predictions_to_max_token_length(prediction)
            prediction = prediction.strip()

            if "i don't know" in prediction_lowercase:
                n_miss += 1
                continue

            accuracy = -1

            for ground_truth in ground_truths:
                ground_truth_lowercase = ground_truth.lower()
                prediction_lowercase = prediction.lower()
                messages = [
                    {"role": "system", "content": system_message},
                    {
                        "role": "user",
                        "content": f"Question: {query}\n Ground truth: {ground_truth}\n Prediction: {prediction}\n",
                    },
                ]
                if prediction_lowercase == ground_truth_lowercase:
                    # exact correct
                    accuracy = 1
                    break
                elif "invalid" in prediction_lowercase and "invalid" in ground_truth_lowercase:
                    accuracy = 1
                    break
                elif "invalid" in prediction_lowercase and "invalid" not in ground_truth_lowercase:
                    # hallucination
                    accuracy = 0
                    continue
                elif "invalid" not in prediction_lowercase and "invalid" in ground_truth_lowercase:
                    # hallucination
                    accuracy = 0
                    continue
                else:
                    # need to use the OpenAI evaluation model to get the accuracy result (0 means wrong, 1 means correct)
                    response = attempt_api_call(openai_client, evaluation_model_name, messages)
                    if response:
                        log_response(messages, response)
                        _, accuracy = parse_response(response)
                        if accuracy == 1:
                            # no need to check other ground truth(s)
                            break

            if accuracy == 1:
                n_correct += 1

        n = len(predictions)
        results = {
            "score": (2 * n_correct + n_miss) / n - 1,
            "accuracy": n_correct / n,
            "hallucination": (n - n_correct - n_miss) / n,
            "missing": n_miss / n,
            "n_miss": n_miss,
            "n_correct": n_correct,
            "n_hallucination": n - n_correct - n_miss,
            "total": n,
        }
        logger.info(results)
        return results
    elif "llama" in evaluation_model_name.lower():
        # now we are using llama model to evaluate
        # to be filled by Jiaqi
        raise NotImplementedError("Llama evaluation model is not implemented yet.")
    else:
        raise NotImplementedError(f"Unknown evaluation model: {evaluation_model_name}")


if __name__ == "__main__":
    from models.user_config import UserModel

    DATASET_PATH = "example_data/dev_data.jsonl.bz2"
    EVALUATION_MODEL_NAME = os.getenv("EVALUATION_MODEL_NAME", "gpt-4-0125-preview")

    # Generate predictions
    participant_model = UserModel()
    queries, ground_truths, predictions = generate_predictions(DATASET_PATH, participant_model)
    # Evaluate Predictions
    openai_client = OpenAI()
    evaluation_results = evaluate_predictions(
        queries, ground_truths, predictions, EVALUATION_MODEL_NAME, openai_client
    )


================================================
FILE: mock_api/.gitignore
================================================
__pycache__/
.ipynb_checkpoints

================================================
FILE: mock_api/README.md
================================================
# Comprehensive RAG Benchmark (CRAG) Mock API

## Prerequisites

Before diving into the setup and usage of the CRAG Mock API, ensure you have the following prerequisites installed and set up on your system:
- Git (for cloning the repository)
- Python 3.10

## Installation Guide

### Setting Up Your Environment

First, clone the repository to your local machine using Git. Then, navigate to the repository directory and install the necessary dependencies:

```
cd mock_api
pip install -r requirements.txt
```

## Running the API Server

To launch the API server on your local machine, use the following Uvicorn command. This starts a fast, asynchronous server to handle API requests.

```
uvicorn server:app --reload
```

Access the API documentation and test the endpoints at `http://127.0.0.1:8000/docs`.

For custom server configurations, specify the host and port as follows:

```
uvicorn server:app --reload --host [HOST] --port [PORT]
```

## System Requirements

- **Supported OS**: Linux, Windows, macOS
- **Python Version**: 3.10
- See `requirements.txt` for a complete list of Python package dependencies.

## Python API Wrapper

For Python developers, the [/mock_api/apiwrapper/pycragapi.py](/mock_api/apiwrapper/pycragapi.py) provides a convenient way to interact with the API. An example usage is demonstrated in [/mock_api/apiwrapper/example_call.ipynb](/mock_api/apiwrapper/example_call.ipynb), showcasing how to efficiently integrate the API into your development workflow.


================================================
FILE: mock_api/apiwrapper/example_call.ipynb
================================================
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e5a9060c-445e-4504-8c58-dddc83d2b7b5",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pycragapi import CRAG\n",
    "\n",
    "api = CRAG()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c99462a5-567e-4980-8db9-d9cb1ec058cd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'result': ['Florida',\n",
       "  'Florida City, Florida',\n",
       "  'Tallahassee, Florida',\n",
       "  'Bushnell, Florida',\n",
       "  'Florida College',\n",
       "  'Florida (disambiguation)',\n",
       "  'Gainesville, Florida',\n",
       "  'Florida, Massachusetts',\n",
       "  'Florida Territory',\n",
       "  'Orlando, Florida']}"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "api.open_search_entity_by_name(\"florida\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "bba4579b-861a-46b6-9b93-681a24558000",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'result': {'summary_text': 'Florida City is a city in Miami-Dade County, Florida, United States. It is the southernmost municipality in the South Florida metropolitan area. Florida City is primarily a Miami suburb and a major agricultural area. As of the 2020 census, it had a population of 13,085, up from 11,245 in 2010.\\nThe city lies to the south and west of, and is contiguous with, Homestead. Both cities suffered catastrophic damage in August 1992 when Hurricane Andrew struck South Florida.\\nThe city originated as a land promotion named \"Detroit\". There were no buildings in the area when the first thirty families arrived in 1910, and they had to stay in Homestead until their houses could be built. The name was changed to \"Florida City\" when the town incorporated in 1914. It has a small historic area, but much of the city is hotels and other tourist facilities.\\nThe city is at the eastern end of the only road running through the Everglades National Park, which terminates at Flamingo. Florida City is the southernmost city in the United States which is not on an island. It is also the last stop on the mainland north of the Florida Keys. The southern terminus of the Homestead Extension of Florida\\'s Turnpike where it ends at its junction with U.S. 1 is located in Florida City. Homestead is immediately north and east of Florida City, and these two cities comprise the greater Homestead-Florida City area. Some of the notable unincorporated communities in the area are Redland, Leisure City, Naranja, and Princeton.',\n",
       "  'summary_structured': {'name': 'Florida City',\n",
       "   'settlement_type': '[[List of communities in Miami-Dade County, Florida|City]]',\n",
       "   'official_name': 'City of Florida City',\n",
       "   'other_name': '',\n",
       "   'native_name': '',\n",
       "   'nickname': '',\n",
       "   'motto': 'Gateway to the Florida Keys and the Everglades<ref>{{cite web|url=http://floridacityfl.net/ |archive-url=https://web.archive.org/web/20130603060421/http://floridacityfl.net/ |url-status=dead |archive-date=June 3, 2013 |title= City of Florida City (Website)|publisher= City of Florida City (Website has had its motto on its website since June 3, 2013) via [[Wayback Machine]] |access-date= March 4, 2019}}</ref>',\n",
       "   'image_skyline': 'Florida City FL city hall02.jpg',\n",
       "   'image_caption': '',\n",
       "   'image_flag': '',\n",
       "   'flag_size': '',\n",
       "   'image_seal': '',\n",
       "   'seal_size': '',\n",
       "   'image_shield': '',\n",
       "   'shield_size': '',\n",
       "   'image_map': 'Miami-Dade_County_Florida_Incorporated_and_Unincorporated_areas_Florida_City_Highlighted.svg',\n",
       "   'mapsize': '250x200px',\n",
       "   'map_caption': 'Location in [[Miami-Dade County, Florida|Miami-Dade County]] and the state of Florida',\n",
       "   'image_map1': 'Florida_City.gif',\n",
       "   'mapsize1': '250x200px',\n",
       "   'map_caption1': 'U.S. Census Bureau map showing city limits',\n",
       "   'pushpin_map': '',\n",
       "   'pushpin_map_caption': '',\n",
       "   'pushpin_mapsize': '',\n",
       "   'subdivision_type': '[[List of sovereign states|Country]]',\n",
       "   'subdivision_name': '{{Nowrap|{{Flag|United States of America|size=23px}}}}',\n",
       "   'subdivision_type1': '[[U.S. state|State]]',\n",
       "   'subdivision_name1': '{{Flag|Florida|size=23px}}',\n",
       "   'subdivision_type2': '[[List of counties in Florida|County]]',\n",
       "   'subdivision_name2': '{{Flagicon image|Flag of Miami-Dade County, Florida.png|size=23px}} [[Miami-Dade County, Florida|Miami-Dade]]',\n",
       "   'government_footnotes': '',\n",
       "   'government_type': '[[Mayor-Council government|Mayor-Council]]',\n",
       "   'leader_title': '[[mayor (United States)|Mayor]]',\n",
       "   'leader_name': 'Otis T. Wallace',\n",
       "   'leader_title1': '[[Vice Mayor]]',\n",
       "   'leader_name1': 'Walter Thompson Sr.',\n",
       "   'leader_title2': '[[city council|Commissioners]]',\n",
       "   'leader_name2': 'James Gold,<br/>Sharon Butler, and<br/>Eugene D. Berry',\n",
       "   'leader_title3': '[[City Manager]]',\n",
       "   'leader_name3': 'Mayor Otis T. Wallace',\n",
       "   'leader_title4': '[[City Clerk]]',\n",
       "   'leader_name4': 'Jennifer A. Evelyn',\n",
       "   'established_title': '[[municipal corporation|Incorporated]]',\n",
       "   'established_date': 'December 29, 1914',\n",
       "   'established_title2': '',\n",
       "   'established_date2': '',\n",
       "   'established_title3': '',\n",
       "   'established_date3': '',\n",
       "   'unit_pref': 'Imperial',\n",
       "   'area_footnotes': '<ref name=\"CenPopGazetteer2022\">{{cite web |title=2022 U.S. Gazetteer Files: Florida |url=https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2022_Gazetteer/2022_gaz_place_12.txt |publisher=United States Census Bureau |accessdate=December 23, 2022}}</ref>',\n",
       "   'area_total_km2': '15.69',\n",
       "   'area_land_km2': '15.51',\n",
       "   'area_water_km2': '0.18',\n",
       "   'area_total_sq_mi': '6.06',\n",
       "   'area_land_sq_mi': '5.99',\n",
       "   'area_water_sq_mi': '0.07',\n",
       "   'area_water_percent': '0',\n",
       "   'population_as_of': '[[2020 United States census|2020]]',\n",
       "   'population_footnotes': '<ref name=\"Census 2020\">{{Cite web| url=https://data.census.gov/cedsci/table?q=&g=1600000US1222975&tid=DECENNIALPL2020.P1| title=P1. Race – Florida City city, Florida: 2020 DEC Redistricting Data (PL 94-171)| publisher=U.S. Census Bureau| access-date=December 23, 2022}}</ref>',\n",
       "   'population_note': '',\n",
       "   'population_total': '13085',\n",
       "   'population_density_km2': '843.49',\n",
       "   'population_density_sq_mi': '2184.47',\n",
       "   'pop_est_as_of': '',\n",
       "   'pop_est_footnotes': '',\n",
       "   'population_est': '',\n",
       "   'population_density_metro_sq_mi': '',\n",
       "   'population_density_urban_sq_mi': '',\n",
       "   'timezone': 'Eastern (EST)',\n",
       "   'utc_offset': '-5',\n",
       "   'timezone_DST': 'EDT',\n",
       "   'utc_offset_DST': '-4',\n",
       "   'coordinates': '{{coord|25|27|05|N|80|29|04|W|region:US-FL|display=inline,title}}',\n",
       "   'elevation_footnotes': '',\n",
       "   'elevation_m': '',\n",
       "   'elevation_ft': '5',\n",
       "   'postal_code_type': '[[ZIP code]]s',\n",
       "   'postal_code': '33034, 33035',\n",
       "   'area_code': '[[Area code 305|305]], [[Area code 786|786]], [[Area code 645|645]]',\n",
       "   'blank_name': '[[Federal Information Processing Standard|FIPS code]]',\n",
       "   'blank_info': '12-22975<ref name=\"GR2\">{{cite web |url=https://www.census.gov |publisher=[[United States Census Bureau]] |access-date=2008-01-31 |title=U.S. Census website }}</ref>',\n",
       "   'blank1_name': '[[Geographic Names Information System|GNIS]] feature ID',\n",
       "   'blank1_info': '0282605<ref name=\"GR3\">{{cite web|url=http://geonames.usgs.gov|access-date=2008-01-31|title=US Board on Geographic Names|publisher=[[United States Geological Survey]]|date=2007-10-25}}</ref>',\n",
       "   'website': '{{URL|www.floridacityfl.gov}}',\n",
       "   'footnotes': ''},\n",
       "  'raw_mediawiki': '{{About|the city known as Florida City|the 2003 film|Florida City (film)}}\\n{{use mdy dates |date=June 2020}}\\n{{Infobox settlement\\n<!--See the Table at Infobox Settlement for all fields and descriptions of usage-->\\n|name                            = Florida City\\n|settlement_type                 = [[List of communities in Miami-Dade County, Florida|City]]\\n|official_name                   = City of Florida City\\n|other_name                      =\\n|native_name                     = <!-- for cities whose native name is not in English -->\\n|nickname                        =\\n|motto                           = Gateway to the Florida Keys and the Everglades<ref>{{cite web|url=http://floridacityfl.net/ |archive-url=https://web.archive.org/web/20130603060421/http://floridacityfl.net/ |url-status=dead |archive-date=June 3, 2013 |title= City of Florida City (Website)|publisher= City of Florida City (Website has had its motto on its website since June 3, 2013) via [[Wayback Machine]] |access-date= March 4, 2019}}</ref>\\n<!-- images and maps  ----------->\\n|image_skyline                   = Florida City FL city hall02.jpg\\n|image_caption                   =\\n|image_flag                      =\\n|flag_size                       =\\n|image_seal                      =\\n|seal_size                       =\\n|image_shield                    =\\n|shield_size                     =\\n|image_map                       = Miami-Dade_County_Florida_Incorporated_and_Unincorporated_areas_Florida_City_Highlighted.svg\\n|mapsize                         = 250x200px\\n|map_caption                     = Location in [[Miami-Dade County, Florida|Miami-Dade County]] and the state of Florida\\n|image_map1                      = Florida_City.gif\\n|mapsize1                        = 250x200px\\n|map_caption1                    = U.S. Census Bureau map showing city limits\\n|pushpin_map                     = <!-- the name of a location map as per http://en.wikipedia.org/wiki/Template:Location_map -->\\n|pushpin_map_caption             =\\n|pushpin_mapsize                 =\\n<!-- Location ------------------>\\n|subdivision_type         = [[List of sovereign states|Country]]\\n|subdivision_name         = {{Nowrap|{{Flag|United States of America|size=23px}}}}\\n|subdivision_type1        = [[U.S. state|State]]\\n|subdivision_name1        = {{Flag|Florida|size=23px}}\\n|subdivision_type2        = [[List of counties in Florida|County]]\\n|subdivision_name2        = {{Flagicon image|Flag of Miami-Dade County, Florida.png|size=23px}} [[Miami-Dade County, Florida|Miami-Dade]]\\n<!-- Politics ----------------->\\n|government_footnotes            =\\n|government_type                 = [[Mayor-Council government|Mayor-Council]]\\n|leader_title                    = [[mayor (United States)|Mayor]]\\n|leader_name                     = Otis T. Wallace\\n|leader_title1                   = [[Vice Mayor]]\\n|leader_name1                    = Walter Thompson Sr.\\n|leader_title2                   = [[city council|Commissioners]]\\n|leader_name2                    = James Gold,<br/>Sharon Butler, and<br/>Eugene D. Berry\\n|leader_title3                   = [[City Manager]]\\n|leader_name3                    = Mayor Otis T. Wallace\\n|leader_title4                   = [[City Clerk]]\\n|leader_name4                    = Jennifer A. Evelyn\\n|established_title               = [[municipal corporation|Incorporated]]\\n|established_date                = December 29, 1914\\n|established_title2              = <!-- Incorporated (town) -->\\n|established_date2               =\\n|established_title3              = <!-- Incorporated (city) -->\\n|established_date3               =\\n<!-- Area    --------------------->\\n|unit_pref                       = Imperial\\n|area_footnotes                  = <ref name=\"CenPopGazetteer2022\">{{cite web |title=2022 U.S. Gazetteer Files: Florida |url=https://www2.census.gov/geo/docs/maps-data/data/gazetteer/2022_Gazetteer/2022_gaz_place_12.txt |publisher=United States Census Bureau |accessdate=December 23, 2022}}</ref>\\n|area_total_km2                  = 15.69\\n<!-- ALL fields dealing with a measurements are subject to automatic unit conversion-->\\n|area_land_km2                   = 15.51\\n<!--See table @ Template:Infobox Settlement for details on automatic unit conversion-->\\n|area_water_km2                  = 0.18\\n|area_total_sq_mi                = 6.06\\n|area_land_sq_mi                 = 5.99\\n|area_water_sq_mi                = 0.07\\n|area_water_percent              = 0\\n<!-- Population   ----------------------->\\n|population_as_of                = [[2020 United States census|2020]]\\n|population_footnotes            = <ref name=\"Census 2020\">{{Cite web| url=https://data.census.gov/cedsci/table?q=&g=1600000US1222975&tid=DECENNIALPL2020.P1| title=P1. Race – Florida City city, Florida: 2020 DEC Redistricting Data (PL 94-171)| publisher=U.S. Census Bureau| access-date=December 23, 2022}}</ref>\\n|population_note                 =\\n|population_total                = 13085\\n|population_density_km2          = 843.49\\n|population_density_sq_mi        = 2184.47\\n|pop_est_as_of                   =\\n|pop_est_footnotes               =\\n|population_est                  =\\n|population_density_metro_sq_mi  =\\n|population_density_urban_sq_mi  =\\n<!-- General information  --------------->\\n|timezone                        = Eastern (EST)\\n|utc_offset                      = -5\\n|timezone_DST                    = EDT\\n|utc_offset_DST                  = -4\\n|coordinates                     = {{coord|25|27|05|N|80|29|04|W|region:US-FL|display=inline,title}}\\n|elevation_footnotes             = <!--for references: use 1 tags-->\\n|elevation_m                     =\\n|elevation_ft                    = 5\\n<!-- Area/postal codes & others -------->\\n|postal_code_type                = [[ZIP code]]s\\n|postal_code                     = 33034, 33035\\n|area_code                       = [[Area code 305|305]], [[Area code 786|786]], [[Area code 645|645]]\\n|blank_name                      = [[Federal Information Processing Standard|FIPS code]]\\n|blank_info                      = 12-22975<ref name=\"GR2\">{{cite web |url=https://www.census.gov |publisher=[[United States Census Bureau]] |access-date=2008-01-31 |title=U.S. Census website }}</ref>\\n|blank1_name                     = [[Geographic Names Information System|GNIS]] feature ID\\n|blank1_info                     = 0282605<ref name=\"GR3\">{{cite web|url=http://geonames.usgs.gov|access-date=2008-01-31|title=US Board on Geographic Names|publisher=[[United States Geological Survey]]|date=2007-10-25}}</ref>\\n|website                         = {{URL|www.floridacityfl.gov}}\\n|footnotes                       =\\n}}\\n\\n\\'\\'\\'Florida City\\'\\'\\' is a city in [[Miami-Dade County, Florida|Miami-Dade County]], Florida, United States. It is the southernmost municipality in the [[South Florida metropolitan area]]. Florida City is primarily a [[Miami]] suburb and a major agricultural area. As of the [[2020 United States census|2020 census]], it had a population of 13,085,<ref name=\"Census 2020\"/> up from 11,245 in 2010.\\n\\nThe city lies to the south and west of, and is contiguous with, [[Homestead, Florida|Homestead]]. Both cities suffered catastrophic damage in August 1992 when [[Hurricane Andrew]] struck South Florida.\\n\\nThe city originated as a land promotion named \"Detroit\". There were no buildings in the area when the first thirty families arrived in 1910, and they had to stay in Homestead until their houses could be built. The name was changed to \"Florida City\" when the town incorporated in 1914.<ref>{{cite book |last=Taylor |first=Jean |date=1985 |title=Villages of South Dade|location=St. Petersburg, Fla |publisher=B. Kennedy |oclc=18906834 |lccn=88132899 |pages=203–205}}</ref> It has a small historic area, but much of the city is hotels and other tourist facilities.\\n\\nThe city is at the eastern end of the only road running through the [[Everglades National Park]], which terminates at [[Flamingo, Florida|Flamingo]]. Florida City is the southernmost city in the United States which is not on an island. It is also the last stop on the mainland north of the [[Florida Keys]]. The southern terminus of the [[Homestead Extension of Florida\\'s Turnpike]] where it ends at its junction with [[U.S. Route 1 in Florida|U.S. 1]] is located in Florida City. Homestead is immediately north and east of Florida City, and these two cities comprise the greater Homestead-Florida City area. Some of the notable unincorporated communities in the area are [[Redland, Florida|Redland]], [[Leisure City, Florida|Leisure City]], [[Naranja, Florida|Naranja]], and [[Princeton, Florida|Princeton]].\\n\\n==Physiography and natural history==\\nFlorida City is situated mostly atop a limestone ridge called the [[Miami Rock Ridge]]<ref name=\"autogenerated1\">{{cite web |url=http://www.miamidade.gov/derm/Ecosystems/pinerocklands.asp |title=Miami-Dade County - Ecosystems |website=www.miamidade.gov |url-status=dead |archive-url=https://web.archive.org/web/20030728142720/http://www.miamidade.gov/derm/Ecosystems/pinerocklands.asp |archive-date=2003-07-28}} </ref> that extends south from present day [[North Miami Beach, Florida|North Miami Beach]]<ref>[http://www.citynmb.com/ City of North Miami Beach, Florida - North Miami Beach<!-- Bot generated title -->]</ref> to a location in [[Everglades National Park]].<ref>[http://www.nps.gov/ever/ Everglades National Park (U.S. National Park Service)<!-- Bot generated title -->]</ref> The ridge, consisting of Miami [[limestone]],<ref>[http://www.dep.state.fl.us/geology/geologictopics/rocks/miami_limestone.htm DRAM, FGS, Miami Limestone<!-- Bot generated title -->]</ref> serves as the higher ground within the community. The ridge extended from northeast to southwest across the city. The old location of the Florida East Coast Railway track marks the approximate boundary of the location of the limestone ridge south of Davis Parkway. The range of elevation of the ridge is from 5 to 8 feet (1.5–2.4 meters) above sea level.\\n\\nBefore settlement, the ridge was vegetated by South Florida Slash Pine trees, which were alternatively known as [[Slash Pine|Dade County Pine]] \\'\\'(Pinus elliottii var. densa)\\'\\'. (Remnants of these pines can be seen today in local parks and in Everglades National Park at the Long Pine Key picnic area.) These [[pine rocklands]]<ref name=\"autogenerated1\" /> were crushed by equipment and converted to farmland during the 1900s.<ref name=\"autogenerated2\">{{Cite web |url=http://www.southmiamidadewatershed.com/Presentations/Hydrology%20May%202002%20WAC_files/frame.htm |title=PowerPoint Presentation<!-- Bot generated title --> |access-date=2006-10-14 |archive-url=https://web.archive.org/web/20071008044418/http://www.southmiamidadewatershed.com/Presentations/Hydrology%20May%202002%20WAC_files/frame.htm |archive-date=2007-10-08 |url-status=dead }}</ref> Tomatoes, squash, and other truck crops were grown in the area during the winter months and packed at the Florida City State Farmers\\' Market<ref>[http://www.florida-agriculture.com/marketing/markets/floridacity_market.htm Florida City State Farmers\\' Market: Marketing Florida Agriculture<!-- Bot generated title -->]</ref> near Krome Avenue and Palm Drive, driving the local economy throughout the 1900s.\\n\\nEast of the natural ridge was a broad area of marshlands surrounding the area. Old timers of Florida City called these coastal glades the \"East Glade\".<ref name=\"autogenerated2\" /> This was an extension of Everglades that extended from areas west and south of Florida City to its east. East of the East Glade, marshlands gave way to [[mangrove swamp]]<ref>[http://www.sfrc.ufl.edu/4h/Ecosystems/Mangrove/mangrove.html Mangrove<!-- Bot generated title -->]</ref> prior to reaching Biscayne Bay.<ref>[http://www.nps.gov/bisc/ Biscayne National Park (U.S. National Park Service)<!-- Bot generated title -->]</ref> Soils in the East Glade primarily consisted of a limey soil called Biscayne Marl.<ref>[http://soils.usda.gov/survey/online_surveys/florida/dade/dsm.html#dsm13 Detailed Soil Map Units (SS of Dade, Florida) | NRCS Soils<!-- Bot generated title -->]</ref>\\n\\nDevelopment schemes in the East Glade led to the construction of canals in the early 1900s.<ref>{{Cite web |url=http://www.southmiamidadewatershed.com/Presentations/Habitat_May%202002%20WAC_files/frame.htm |title=PowerPoint Presentation<!-- Bot generated title --> |access-date=2006-10-14 |archive-url=https://web.archive.org/web/20071008044522/http://www.southmiamidadewatershed.com/Presentations/Habitat_May%202002%20WAC_files/frame.htm |archive-date=2007-10-08 |url-status=dead }}</ref> This led to a lowering of water tables. Although development the East Glade was not extensive prior to the 1980s, agricultural development did occur. Potatoes were the primary crop grown in the East Glade before the construction of extensive housing developments within the areas annexed by the [[Homestead, Florida|City of Homestead]]<ref>[http://ci.homestead.fl.us/ City of Homestead - Online<!-- Bot generated title -->]</ref> in the late 1970s. Potatoes mostly were harvested from February to March.\\n\\nFlorida City was historically bisected by a [[Slough (hydrology)|slough]]. Sloughs commonly were found crossing the limestone ridge at a roughly perpendicular angle from Miami to Florida City. Florida City\\'s slough (officially called \"Long Slough\" or \"Long Glade Slough\") entered the city near Redland Road and Lucy Street, and extended across the city to the southeast to a location near today\\'s NW 3rd Street and NW 3rd Avenue. East of this point, the slough entered the East Glade.\\n\\nLong Slough was a slow flowing body of water that originated in the Everglades just south of the [[Miami Homestead General Aviation Airport]].<ref>{{Cite web |url=http://www.miami-airport.com/html/homestead_general_.html |title=Homestead General<!-- Bot generated title --> |access-date=2006-10-14 |archive-url=https://web.archive.org/web/20061018094832/http://www.miami-airport.com/html/homestead_general_.html |archive-date=2006-10-18 |url-status=dead }}</ref> As canals were constructed in the 1900s, and especially the 1960s, the slough was drained and became a low valley in the limestone ridge. Roadways (such as Redland Road near West Homestead Elementary School,<ref>[http://whe.dadeschools.net/ Welcome to West Homestead Elementary<!-- Bot generated title -->]</ref> NW 6th Avenue north of Davis Parkway, and NW 3rd Avenue about fifty feet north of NW 3rd Street) had culverts constructed under them to allow water to pass through the slough. NW 4th Street east of NW 5th Avenue dead ended near the approximate location where a fictional NW 4th Avenue would intersect that street. During the late 1980s, the street was constructed to reach NW 3rd Avenue since water in the slough had been drained away. Eventually fill was added to the slough and it was destroyed.\\n\\nExtensive filling operations were conducted in Long Slough near NW 3rd Avenue in the late 1970s. Fill was obtained as waste rock from a nearby rock cutting operation (utilizing Key Largo Limestone,<ref>[http://www.dep.state.fl.us/geology/geologictopics/rocks/key_largo.htm DRAM, FGS, Key Largo Limestone<!-- Bot generated title -->]</ref> a local coral rock) and was allowed to be dumped in the location by the landowners. Today, this portion of Long Slough serves as a housing development.\\n\\nAn additional natural feature existed along Davis Parkway, extending into the Florida City Camper Park. This feature was a live oak [[Hammock (ecology)|hammock]].<ref>[http://www.sfrc.ufl.edu/4h/Ecosystems/Tropical_Hammocks/tropical_hammocks.html Tropical Hammocks<!-- Bot generated title -->]</ref> The understory of the hammock was cleared for the camper park, but much of the hammock remained undisturbed to the south of Davis Parkway and NW 1st Road before the late 1970s.\\n\\nFlorida City today serves as the southern terminus of the [[Homestead Extension of Florida\\'s Turnpike]].<ref>[http://www.floridasturnpike.com/ Florida\\'s Turnpike - The Less Stressway<!-- Bot generated title -->]</ref> Motels and eateries are located along US 1 before taking the highway south into the Florida Keys. Along with serving as the mainland entrance to the [[Florida Keys]],<ref>[http://www.fla-keys.com/ The Official Tourism Council Web Site for the Florida Keys! Key Largo, Islamorada, Marathon, Lower Keys, Key West<!-- Bot generated title -->]</ref> Florida City also serves as the gateway to the main section of [[Everglades National Park]].<ref>[http://www.nps.gov/ever Everglades National Park (U.S. National Park Service)<!-- Bot generated title -->]</ref>\\n\\n==Geography==\\nFlorida City is located at {{Coord|25.451331|-80.484383|type:city_region:US|format=dms|display=inline}}.<ref name=\"GR1\">{{cite web|url=https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html|publisher=[[United States Census Bureau]]|access-date=2011-04-23|date=2011-02-12|title=US Gazetteer files: 2010, 2000, and 1990}}</ref>\\n\\nAccording to the [[United States Census Bureau]], the city has a total area of {{convert|6.1|sqmi}}, of which {{convert|0.07|sqmi|2}}, or 1.14%, are water.<ref name=\"CenPopGazetteer2022\"/>\\n\\n==Demographics==\\n{{US Census population\\n|1920= 355\\n|1930= 452\\n|1940= 752\\n|1950= 1547\\n|1960= 4114\\n|1970= 5133\\n|1980= 6174\\n|1990= 5806\\n|2000= 7843\\n|2010= 11245\\n|2020= 13085\\n|footnote=U.S. Decennial Census<ref name=\"DecennialCensus\">{{cite web|url=https://www.census.gov/programs-surveys/decennial-census.html|title=Census of Population and Housing|publisher=Census.gov|access-date=June 4, 2015}}</ref>\\n}}\\n\\n===2020 census===\\n{| class=\"wikitable\"\\n|+\\'\\'\\'Florida City racial composition\\'\\'\\'<br /> (Hispanics excluded from racial categories)<br /> (\\'\\'NH = Non-Hispanic\\'\\')<ref>{{Cite web|title=Explore Census Data|url=https://data.census.gov/cedsci/table?g=1600000US1222975&tid=DECENNIALPL2020.P2|access-date=2022-02-08|website=data.census.gov}}</ref>\\n!Race\\n!Number\\n!Percentage\\n|-\\n|[[Non-Hispanic or Latino whites|White]] (NH)\\n|498\\n|3.81%\\n|-\\n|[[Non-Hispanic or Latino African Americans|Black or African American]] (NH)\\n|5,786\\n|44.22%\\n|-\\n|[[Native Americans in the United States|Native American]] or [[Alaska Native]] (NH)\\n|13\\n|0.10%\\n|-\\n|[[Asian Americans|Asian]] (NH)\\n|24\\n|0.18%\\n|-\\n|[[Pacific Islander Americans|Pacific Islander]] or [[Native Hawaiian]] (NH)\\n|3\\n|0.02%\\n|-\\n|[[Other races (U.S. Census)|Some Other Race]] (NH)\\n|56\\n|0.43%\\n|-\\n|[[Multiracial Americans|Two or more races/Multiracial]] (NH)\\n|182\\n|1.39%\\n|-\\n|[[Hispanic and Latino Americans|Hispanic or Latino]] (any race)\\n|6,523\\n|49.85%\\n|-\\n|\\'\\'\\'Total\\'\\'\\'\\n|\\'\\'\\'13,085\\'\\'\\'\\n|\\'\\'\\'100.00%\\'\\'\\'\\n|}\\n\\nAs of the [[2020 United States census]], there were 13,085 people, 3,050 households, and 2,247 families residing in the city.<ref>{{Cite web|title=S1101 HOUSEHOLDS AND FAMILIES - 2020: Florida City city, Florida|url=https://data.census.gov/table?q=Florida+City+city;+Florida+&tid=ACSST5Y2020.S1101|website=[[United States Census Bureau]]}}</ref>\\n\\n===2010 census===\\n{| class=\"wikitable\" style=\"float: left; margin-right: 2em; width: 35%; font-size: 75%;\"\\n!colspan=4|Florida City Demographics\\n|-\\n![[United States Census, 2010|2010 Census]]||Florida City||Miami-Dade County||Florida\\n|-\\n|Total population||11,245||2,496,435||18,801,310\\n|-\\n|Population, percent change, 2000 to 2010||+43.4%||+10.8%||+17.6%\\n|-\\n|Population density||1,888.7/sq&nbsp;mi||1,315.5/sq&nbsp;mi||350.6/sq&nbsp;mi\\n|-\\n|[[White (U.S. Census)|White or Caucasian]] (including [[White Hispanic]])||5.6%||?%||?%\\n|-\\n|([[Non-Hispanic Whites|Non-Hispanic White or Caucasian]])||5.6%||15.4%||57.9%\\n|-\\n|[[Black (U.S. Census)|Black or African-American]]||52.4%||18.9%||16.0%\\n|-\\n|[[Hispanic (U.S. Census)|Hispanic or Latino (of any race)]]||42.4%||65.0%||22.5%\\n|-\\n|[[Asian (U.S. Census)|Asian]]||0.3%||1.5%||2.4%\\n|-\\n|[[Native American (U.S. Census)|Native American]] or [[Native Alaskan]]||0.2%||0.2%||0.4%\\n|-\\n|[[Pacific Islander (U.S. Census)|Pacific Islander]] or [[Native Hawaiian]]||0.0%||0.0%||0.1%\\n|-\\n|[[Multiracial American|Two or more races (Multiracial)]]||2.6%||2.4%||2.5%\\n|-\\n|[[Other races (U.S. Census)|Some Other Race]]||5.4%||3.2%||3.6%\\n|}\\n\\nAs of the [[2010 United States census]], there were 11,245 people, 2,883 households, and 2,216 families residing in the city.<ref>{{Cite web|title=S1101 HOUSEHOLDS AND FAMILIES - 2010: Florida City city, Florida|url=https://data.census.gov/table?q=Florida+City+city;+Florida+&tid=ACSST5Y2010.S1101|website=[[United States Census Bureau]]}}</ref>\\n\\nBased on 2010 data, the ancestries of only the Hispanic and Latino population from highest to lowest were as follows: [[Mexican people|Mexicans]] made up the 42.52%, [[Cuban people|Cubans]] were at 19.13%, [[Central American]]s accounted for 13.37%, [[Puerto Rican people|Puerto Ricans]] totaled 12.87%, and [[South American]]s were 3.74% of all residents.<ref>{{cite web |url=http://www.usa.com/florida-city-fl-population-and-races.htm |title=Florida City, FL Population and Races |publisher=usatoday.com |access-date=2015-01-16}}</ref>\\n\\n===2000 census===\\nIn 2000, 46.5% had children under the age of 18 living with them, 35.6% were married couples living together, 34.0% had a female householder with no husband present, and 23.1% were non-families. 18.1% of all households were made up of individuals, and 6.7% had someone living alone who was 65 years of age or older. The average household size was 3.48 and the average family size was 3.95.\\n\\nIn 2000, the city population was spread out, with 39.7% under the age of 18, 11.0% from 18 to 24, 26.3% from 25 to 44, 15.8% from 45 to 64, and 7.2% who were 65 years of age or older. The median age was 24 years. For every 100 females, there were 94.7 males. For every 100 females age 18 and over, there were 89.7 males.\\n\\nIn 2000, the median income for a household in the city was $14,923, and the median income for a family was $18,777. Males had a median income of $23,622 versus $20,060 for females. The [[per capita income]] for the city was $8,270. 43.3% of the population and 41.7% of families were below the [[poverty line]]. 57.1% of those under the age of 18 and 25.6% of those 65 and older were living below the poverty line.\\n\\nAs of 2000, [[English language|English]] was spoken as a [[first language]] by 65.64% of the population, [[Spanish language|Spanish]] speakers made up 28.33% of all residents, and [[Haitian Creole|French Creole]] was spoken by 6.03% of the populace.<ref>{{cite web |url=http://www.mla.org/map_data_results&state_id=12&county_id=&mode=place&zip=&place_id=22975&cty_id=&ll=&a=&ea=&order=r |title=MLA Data Center Results of Florida City, Fla. |publisher=[[Modern Language Association]] |access-date=2007-11-03}}</ref>\\n\\n===Crime===\\nAs of 2020, Florida City was rated as the number one \"most dangerous\" city in the state of Florida. Within a population of 11,826, it had a violent crime rate of 2,908.8 per 100,000. The poverty rate of the city was listed at 14%.<ref>{{Cite web|url=https://www.msn.com/en-us/money/realestate/25-most-dangerous-cities-in-florida/ss-AAQMh4q#image=26|title = 25 Most Dangerous Cities in Florida|website = [[MSN]]}}</ref>\\n\\n==Government and infrastructure==\\nThe [[Florida Department of Corrections]] operates the [[Dade Correctional Institution]] and the [[Homestead Correctional Institution]] in an [[unincorporated area]] near Florida City.<ref>\"[http://nl.newsbank.com/nl-search/we/Archives?p_product=MH&s_site=miami&p_multi=MH&p_theme=realcities&p_action=search&p_maxdocs=200&p_topdoc=1&p_text_direct-0=0EB5D36377DE75DD&p_field_direct-0=document_id&p_perpage=10&p_sort=YMD_date:D&s_trackval=GooglePM STATE\\'S PRISON INMATES SHUFFLED MOVES BENEFIT FEMALE PRISONERS].\" \\'\\'[[Miami Herald]]\\'\\'. August 12, 1999. B1. Broward. Retrieved on May 15, 2010. \"Nearly 500 male youthful offenders at Dade Correctional Institution in Florida City...\"</ref><ref>\"[http://www.dc.state.fl.us/facilities/region4/463.html Dade Correctional Institution] {{Webarchive|url=https://web.archive.org/web/20100428033554/http://www.dc.state.fl.us/facilities/region4/463.html |date=April 28, 2010 }}.\" [[Florida Department of Corrections]]. Retrieved on May 15, 2010.</ref><ref>\"[http://www.dc.state.fl.us/facilities/region4/419.html Homestead Correctional Institution] {{Webarchive|url=https://web.archive.org/web/20100528232506/http://www.dc.state.fl.us/facilities/region4/419.html |date=May 28, 2010 }}.\" [[Florida Department of Corrections]]. Retrieved on May 15, 2010.</ref><ref>\"[http://nl.newsbank.com/nl-search/we/Archives?p_product=BH&s_site=bradenton&p_multi=BH&p_theme=realcities&p_action=search&p_maxdocs=200&p_topdoc=1&p_text_direct-0=1032A45263CBEE84&p_field_direct-0=document_id&p_perpage=10&p_sort=YMD_date:D&s_trackval=GooglePM THEFT CHARGE PUTS CORDES BACK IN COURT].\" \\'\\'[[Bradenton Herald]]\\'\\'. June 10, 2004. 1C Local & State. Retrieved on May 15, 2010. \"Jackie Postma who was convicted of seconddegree murder is serving her sentence at Homestead Correctional Institution in Florida City just south of Miami.\"</ref> The Dade CI was originally the Dade Correctional Institution Annex, and the Homestead CI was originally the Dade Correctional Institution; the two received their current names on July 1, 2003.<ref>\"[http://www.dc.state.fl.us/pub/annual/0203/pdfs/facilities.pdf FACILITIES ON JUNE 30, 2003] {{Webarchive|url=https://web.archive.org/web/20120229161226/http://www.dc.state.fl.us/pub/annual/0203/pdfs/facilities.pdf |date=February 29, 2012 }}.\" [[Florida Department of Corrections]]. Retrieved on May 15, 2010.</ref>\\n\\nThe [[United States Postal Service]] operates the Florida City Post Office.<ref>\"[http://usps.whitepages.com/service/post_office/florida-city-1000-w-palm-dr-homestead-fl-1438681 Post Office Location - FLORIDA CITY] {{Webarchive|url=https://web.archive.org/web/20100512080124/http://usps.whitepages.com/service/post_office/florida-city-1000-w-palm-dr-homestead-fl-1438681 |date=2010-05-12 }}.\" [[United States Postal Service]]. Retrieved on May 15, 2010.</ref>\\n\\n==Education==\\nFlorida City is a part of the [[Miami-Dade County Public Schools]] system.\\n\\nFlorida City is zoned to:\\n* Florida City Elementary School (Florida City)\\n* Homestead Middle School ([[Homestead, Florida|Homestead]])\\n* [[Homestead High School (Homestead, Florida)|Homestead High School]] (Homestead)\\n\\nIn addition [[Rise Academy-South Dade Charter School]] is in the area.<ref>{{Cite web |url=http://www.riseschools.org/ |title=Rise Schools |access-date=2019-12-17 |archive-url=https://web.archive.org/web/20090614081327/http://riseschools.org/ |archive-date=2009-06-14 |url-status=dead }}</ref>\\n\\nFlorida City also has the following [[Charter School]]s:\\n* Lawrence Academy Charter\\n* Lincoln Marti International Campus\\n* Miami Community Charter\\n\\n==Climate==\\nThe [[Köppen Climate Classification]] sub-type for this climate is \"[[Tropical savanna climate|Aw]]\". (Tropical Savanna Climate) with long, hot summers and short, warm winters.<ref>[http://www.weatherbase.com/weather/weather-summary.php3?s=67780&cityname=Florida+City%2C+Florida%2C+United+States+of+America&units= Climate Summary for Florida City, FL]</ref>\\n{{Weather box\\n|location = Florida City\\n|single line = Yes\\n|Jan high F = 78\\n|Feb high F = 80\\n|Mar high F = 82\\n|Apr high F = 85\\n|May high F = 88\\n|Jun high F = 90\\n|Jul high F = 91\\n|Aug high F = 92\\n|Sep high F = 90\\n|Oct high F = 87\\n|Nov high F = 83\\n|Dec high F = 79\\n|year high F = 85\\n|Jan low F = 54\\n|Feb low F = 56\\n|Mar low F = 58\\n|Apr low F = 61\\n|May low F = 66\\n|Jun low F = 71\\n|Jul low F = 73\\n|Aug low F = 73\\n|Sep low F = 73\\n|Oct low F = 69\\n|Nov low F = 63\\n|Dec low F = 57\\n|year low F = 65\\n|Jan precipitation inch = 1.6\\n|Feb precipitation inch = 1.8\\n|Mar precipitation inch = 2\\n|Apr precipitation inch = 2.7\\n|May precipitation inch = 5.9\\n|Jun precipitation inch = 9.1\\n|Jul precipitation inch = 7\\n|Aug precipitation inch = 8.1\\n|Sep precipitation inch = 8.7\\n|Oct precipitation inch = 5.5\\n|Nov precipitation inch = 2.3\\n|Dec precipitation inch = 1.4\\n|year precipitation inch = 56.1\\n|source 1 = Weatherbase <ref name=Weatherbase>\\n{{cite web\\n|url =http://www.weatherbase.com/weather/weather.php3?s=67780&cityname=Florida-City-Florida\\n|publisher=Weatherbase\\n|title=Weatherbase.com\\n|year=2013\\n}}\\nRetrieved on August 2, 2013.\\n</ref>\\n|date=August 2013\\n}}\\n\\n==Notable people==\\n* [[James Burgess (American football, born 1994)|James Burgess]], American football player\\n* [[Rashad Smith (American football)|Rashad Smith]], American football player\\n* [[Sean Taylor]], American Football Player\\n* [[Glenn Simmons]], outdoorsman and guide\\n\\n==References==\\n{{reflist}}\\n\\n==External links==\\n{{Wikivoyage|Florida City}}\\n* {{Official|www.floridacityfl.gov}}\\n* [http://www.floridacityes.org/ Florida City Elementary School]\\n\\n{{Geographic location\\n| Northwest = Unincorporated [[Miami-Dade County, Florida|Miami-Dade County]]\\n| North = [[Homestead, Florida|Homestead]]\\n| Northeast = [[Homestead, Florida|Homestead]]\\n| West = Unincorporated [[Miami-Dade County, Florida|Miami-Dade County]]\\n| Center = Florida City\\n| East = [[Homestead, Florida|Homestead]]\\n| Southwest =Unincorporated [[Miami-Dade County, Florida|Miami-Dade County]]\\n| South = Unincorporated [[Miami-Dade County, Florida|Miami-Dade County]]\\n| Southeast = Unincorporated [[Miami-Dade County, Florida|Miami-Dade County]]\\n}}\\n{{Dade County, Florida}}\\n{{authority control}}\\n\\n[[Category:Florida City, Florida| ]]\\n[[Category:Cities in Miami-Dade County, Florida]]\\n[[Category:Populated places established in 1914]]\\n[[Category:Cities in Florida]]\\n[[Category:Cities in Miami metropolitan area]]\\n[[Category:1914 establishments in Florida]]'}}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "api.open_get_entity(\"Florida City, Florida\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "d21bf052-cbb5-4b28-a3b6-72901318eed8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'result': [{'acted_movies': [137113],\n",
       "   'id': 2949449,\n",
       "   'birthday': None,\n",
       "   'name': 'Jackson'},\n",
       "  {'acted_movies': [454293],\n",
       "   'id': 2669821,\n",
       "   'birthday': None,\n",
       "   'name': 'Noelle Jackson'},\n",
       "  {'acted_movies': [78192, 616815, 622146, 893018, 1226841],\n",
       "   'id': 992668,\n",
       "   'birthday': '1953-10-15',\n",
       "   'name': 'Tito Jackson'},\n",
       "  {'acted_movies': [109410, 19912, 118612, 15670, 14047, 84653, 152023],\n",
       "   'id': 94429,\n",
       "   'birthday': None,\n",
       "   'name': 'Jackson Walker'},\n",
       "  {'acted_movies': [7453, 682377, 208295, 890280, 991642],\n",
       "   'id': 53352,\n",
       "   'birthday': '1991-12-03',\n",
       "   'name': 'Dominique Jackson'},\n",
       "  {'acted_movies': [12107,\n",
       "    508003,\n",
       "    8291,\n",
       "    75009,\n",
       "    35688,\n",
       "    17202,\n",
       "    44944,\n",
       "    622146,\n",
       "    23756,\n",
       "    120406,\n",
       "    131246,\n",
       "    1037102,\n",
       "    695874,\n",
       "    851629,\n",
       "    893018,\n",
       "    1050238,\n",
       "    1081735],\n",
       "   'id': 54421,\n",
       "   'birthday': '1966-05-16',\n",
       "   'name': 'Janet Jackson'},\n",
       "  {'acted_movies': [13, 523518],\n",
       "   'id': 1465241,\n",
       "   'birthday': None,\n",
       "   'name': 'Lazarus Jackson'},\n",
       "  {'acted_movies': [505444],\n",
       "   'id': 3077816,\n",
       "   'birthday': None,\n",
       "   'name': 'Jackson Blairwest'},\n",
       "  {'acted_movies': [12483, 87496],\n",
       "   'id': 1185258,\n",
       "   'birthday': None,\n",
       "   'name': 'Jackson Warris'},\n",
       "  {'acted_movies': [653364,\n",
       "    158762,\n",
       "    45888,\n",
       "    420476,\n",
       "    1246860,\n",
       "    718838,\n",
       "    869935,\n",
       "    944194],\n",
       "   'id': 115573,\n",
       "   'oscar_awards': [{'year_ceremony': 1971,\n",
       "     'ceremony': 43,\n",
       "     'category': 'ACTRESS',\n",
       "     'name': 'Glenda Jackson',\n",
       "     'film': 'Women in Love',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 1972,\n",
       "     'ceremony': 44,\n",
       "     'category': 'ACTRESS',\n",
       "     'name': 'Glenda Jackson',\n",
       "     'film': 'Sunday Bloody Sunday',\n",
       "     'winner': False},\n",
       "    {'year_ceremony': 1974,\n",
       "     'ceremony': 46,\n",
       "     'category': 'ACTRESS',\n",
       "     'name': 'Glenda Jackson',\n",
       "     'film': 'A Touch of Class',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 1976,\n",
       "     'ceremony': 48,\n",
       "     'category': 'ACTRESS',\n",
       "     'name': 'Glenda Jackson',\n",
       "     'film': 'Hedda',\n",
       "     'winner': False}],\n",
       "   'birthday': '1936-05-09',\n",
       "   'name': 'Glenda Jackson'}]}"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "api.movie_get_person_info(\"Jackson\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "6fb246d0-7ebc-47d1-a868-2a173d529841",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'result': [{'budget': 25000000,\n",
       "   'genres': [{'id': 27, 'name': 'Horror'}],\n",
       "   'id': 14564,\n",
       "   'original_language': 'en',\n",
       "   'original_title': 'Rings',\n",
       "   'release_date': '2017-02-01',\n",
       "   'revenue': 83080890,\n",
       "   'title': 'Rings',\n",
       "   'cast': [{'gender': 1,\n",
       "     'id': 1464589,\n",
       "     'name': 'Matilda Lutz',\n",
       "     'character': 'Julia',\n",
       "     'order': 0},\n",
       "    {'gender': 2,\n",
       "     'id': 1167375,\n",
       "     'name': 'Alex Roe',\n",
       "     'character': 'Holt Anthony',\n",
       "     'order': 1},\n",
       "    {'gender': 2,\n",
       "     'id': 16478,\n",
       "     'name': 'Johnny Galecki',\n",
       "     'character': 'Gabriel Brown',\n",
       "     'order': 2},\n",
       "    {'gender': 2,\n",
       "     'id': 7132,\n",
       "     'name': \"Vincent D'Onofrio\",\n",
       "     'character': 'Galen Burke',\n",
       "     'order': 3},\n",
       "    {'gender': 1,\n",
       "     'id': 145836,\n",
       "     'name': 'Aimee Teegarden',\n",
       "     'character': 'Skye Johnston',\n",
       "     'order': 4},\n",
       "    {'gender': 1,\n",
       "     'id': 58517,\n",
       "     'name': 'Bonnie Morgan',\n",
       "     'character': 'Samara Morgan',\n",
       "     'order': 5},\n",
       "    {'gender': 2,\n",
       "     'id': 1502945,\n",
       "     'name': 'Chuck David Willis',\n",
       "     'character': 'Blue',\n",
       "     'order': 6},\n",
       "    {'gender': 2,\n",
       "     'id': 1635137,\n",
       "     'name': 'Patrick Walker',\n",
       "     'character': 'Jamal',\n",
       "     'order': 7},\n",
       "    {'gender': 2,\n",
       "     'id': 221841,\n",
       "     'name': 'Zach Roerig',\n",
       "     'character': 'Carter',\n",
       "     'order': 8},\n",
       "    {'gender': 1,\n",
       "     'id': 439253,\n",
       "     'name': 'Laura Slade Wiggins',\n",
       "     'character': 'Faith',\n",
       "     'order': 9},\n",
       "    {'gender': 1,\n",
       "     'id': 84432,\n",
       "     'name': 'Lizzie Brocheré',\n",
       "     'character': 'Kelly',\n",
       "     'order': 10},\n",
       "    {'gender': 0,\n",
       "     'id': 1386131,\n",
       "     'name': 'Drew Grey',\n",
       "     'character': 'Sam',\n",
       "     'order': 11},\n",
       "    {'gender': 1,\n",
       "     'id': 1731341,\n",
       "     'name': 'Kayli Carter',\n",
       "     'character': 'Evelyn Borden',\n",
       "     'order': 12},\n",
       "    {'gender': 1,\n",
       "     'id': 196843,\n",
       "     'name': 'Jill Jane Clements',\n",
       "     'character': 'Karen Styx',\n",
       "     'order': 13},\n",
       "    {'gender': 1,\n",
       "     'id': 1731344,\n",
       "     'name': 'Andrea Laing',\n",
       "     'character': 'Libby',\n",
       "     'order': 14},\n",
       "    {'gender': 1,\n",
       "     'id': 1731337,\n",
       "     'name': 'Surely Alvelo',\n",
       "     'character': 'Shanda',\n",
       "     'order': 15},\n",
       "    {'gender': 2,\n",
       "     'id': 1287005,\n",
       "     'name': 'Adam Fristoe',\n",
       "     'character': 'Chris',\n",
       "     'order': 16},\n",
       "    {'gender': 1,\n",
       "     'id': 106949,\n",
       "     'name': 'Andrea Powell',\n",
       "     'character': \"Julia's Mom\",\n",
       "     'order': 17},\n",
       "    {'gender': 2,\n",
       "     'id': 1227437,\n",
       "     'name': 'Michael Sanders',\n",
       "     'character': 'Capt. J Forsett',\n",
       "     'order': 18},\n",
       "    {'gender': 2,\n",
       "     'id': 1622086,\n",
       "     'name': 'Chris Greene',\n",
       "     'character': 'Officer Gonzalez',\n",
       "     'order': 19}],\n",
       "   'crew': [{'name': 'Debra Zane', 'job': 'Casting', 'id': 495},\n",
       "    {'name': 'Chris Bender', 'job': 'Executive Producer', 'id': 298},\n",
       "    {'name': 'Walter F. Parkes', 'job': 'Producer', 'id': 2212},\n",
       "    {'name': 'Neal Edelstein', 'job': 'Executive Producer', 'id': 5625},\n",
       "    {'name': 'Akiva Goldsman', 'job': 'Screenplay', 'id': 5575},\n",
       "    {'name': 'Meg Everist', 'job': 'Set Decoration', 'id': 6412},\n",
       "    {'name': 'Ehren Kruger', 'job': 'Executive Producer', 'id': 15244},\n",
       "    {'name': 'Laurie MacDonald', 'job': 'Producer', 'id': 8701},\n",
       "    {'name': 'Steve Mirkovich', 'job': 'Editor', 'id': 8751},\n",
       "    {'name': 'Lenny Vullo', 'job': 'Production Manager', 'id': 10398},\n",
       "    {'name': 'Marc Fishman', 'job': 'Sound Re-Recording Mixer', 'id': 13177},\n",
       "    {'name': 'Tony Lamberti', 'job': 'Sound Re-Recording Mixer', 'id': 13179},\n",
       "    {'name': 'Keith Campbell', 'job': 'Stunt Coordinator', 'id': 15318},\n",
       "    {'name': 'Kevin Kavanaugh', 'job': 'Production Design', 'id': 15328},\n",
       "    {'name': 'Naaman Marshall',\n",
       "     'job': 'Supervising Art Director',\n",
       "     'id': 17677},\n",
       "    {'name': 'J.C. Spink', 'job': 'Executive Producer', 'id': 20223},\n",
       "    {'name': 'Roy Lee', 'job': 'Executive Producer', 'id': 21036},\n",
       "    {'name': \"Jeremiah O'Driscoll\", 'job': 'Editor', 'id': 23781},\n",
       "    {'name': 'Kôji Suzuki', 'job': 'Novel', 'id': 27786},\n",
       "    {'name': 'Sharone Meir', 'job': 'Director of Photography', 'id': 53181},\n",
       "    {'name': 'Dawn Fintor', 'job': 'Foley Artist', 'id': 113045},\n",
       "    {'name': 'Alicia Stevenson', 'job': 'Foley Artist', 'id': 113090},\n",
       "    {'name': 'Mike Macari', 'job': 'Executive Producer', 'id': 63984},\n",
       "    {'name': 'David Loucka', 'job': 'Screenplay', 'id': 68039},\n",
       "    {'name': 'David Loucka', 'job': 'Story', 'id': 68039},\n",
       "    {'name': 'Jacob Aaron Estes', 'job': 'Screenplay', 'id': 72034},\n",
       "    {'name': 'Jacob Aaron Estes', 'job': 'Story', 'id': 72034},\n",
       "    {'name': 'Bob Shelley', 'job': 'Special Effects Coordinator', 'id': 74783},\n",
       "    {'name': 'Brian Relyea', 'job': 'First Assistant Director', 'id': 75379},\n",
       "    {'name': 'Chris Silver Finigan',\n",
       "     'job': 'Production Accountant',\n",
       "     'id': 91931},\n",
       "    {'name': 'F. Javier Gutiérrez', 'job': 'Director', 'id': 94403},\n",
       "    {'name': 'Bart Mixon', 'job': 'Makeup Effects', 'id': 104028},\n",
       "    {'name': 'Joy Ellison', 'job': 'Dialect Coach', 'id': 165734},\n",
       "    {'name': 'Arjen Tuiten', 'job': 'Makeup Effects Designer', 'id': 229811},\n",
       "    {'name': 'Christopher Peterson', 'job': 'Costume Design', 'id': 582807},\n",
       "    {'name': 'Matthew Margeson',\n",
       "     'job': 'Original Music Composer',\n",
       "     'id': 969021},\n",
       "    {'name': 'Kevin McKeever', 'job': 'Music Editor', 'id': 1027022},\n",
       "    {'name': 'Bill Sturgeon', 'job': 'Makeup Effects Designer', 'id': 1286358},\n",
       "    {'name': 'Sam Restivo', 'job': 'First Assistant Editor', 'id': 1333160},\n",
       "    {'name': 'Hartsell Taylor', 'job': 'Costume Supervisor', 'id': 1333607},\n",
       "    {'name': 'Chris Terhune', 'job': 'Sound Effects Editor', 'id': 1338484},\n",
       "    {'name': 'Lisa Reynolds', 'job': 'Special Effects', 'id': 1339427},\n",
       "    {'name': 'John Marquis', 'job': 'Sound Designer', 'id': 1345594},\n",
       "    {'name': 'Chase Paris', 'job': 'Local Casting', 'id': 1345610},\n",
       "    {'name': 'Tara Feldstein Bennett', 'job': 'Casting', 'id': 1345611},\n",
       "    {'name': 'Maida N. Morgan', 'job': 'Location Manager', 'id': 1355973},\n",
       "    {'name': 'David V. Butler', 'job': 'Dialogue Editor', 'id': 1357059},\n",
       "    {'name': 'David V. Butler', 'job': 'ADR Editor', 'id': 1357059},\n",
       "    {'name': 'Thomas Tannenberger',\n",
       "     'job': 'Visual Effects Producer',\n",
       "     'id': 1358022},\n",
       "    {'name': 'Dane Allan Smith',\n",
       "     'job': 'Visual Effects Producer',\n",
       "     'id': 1386918},\n",
       "    {'name': 'Bob Gorelick', 'job': 'Steadicam Operator', 'id': 1395281},\n",
       "    {'name': 'Jennifer Badger', 'job': 'Stunt Driver', 'id': 1399126},\n",
       "    {'name': 'Amy Pawlowski',\n",
       "     'job': 'Digital Intermediate Editor',\n",
       "     'id': 1400354},\n",
       "    {'name': 'Kira Roessler', 'job': 'Dialogue Editor', 'id': 1404718},\n",
       "    {'name': 'Stephanie Lowry', 'job': 'Music Editor', 'id': 1409877},\n",
       "    {'name': 'Kelly E. Marlow', 'job': 'Key Hair Stylist', 'id': 1412770},\n",
       "    {'name': 'Vanessa Galvez',\n",
       "     'job': 'Digital Intermediate Producer',\n",
       "     'id': 1414291},\n",
       "    {'name': 'Fionagh Cush', 'job': 'Makeup Department Head', 'id': 1415332},\n",
       "    {'name': 'Jed Dornoff', 'job': 'Makeup Effects', 'id': 1417863},\n",
       "    {'name': 'Aimee Macabeo', 'job': 'Hair Supervisor', 'id': 1425902},\n",
       "    {'name': 'Scott Troha', 'job': 'Leadman', 'id': 1428137},\n",
       "    {'name': 'Micky Froehlich', 'job': 'Camera Operator', 'id': 1432042},\n",
       "    {'name': 'Dhyana Forte', 'job': 'Makeup Artist', 'id': 1433657},\n",
       "    {'name': 'J. A. Byerly', 'job': 'Rigging Gaffer', 'id': 1435656},\n",
       "    {'name': 'Corrina Roshea Bobb', 'job': 'Stunt Double', 'id': 1438316},\n",
       "    {'name': 'Danny Wagner', 'job': 'Makeup Effects', 'id': 1444238},\n",
       "    {'name': 'P.K. Hooker', 'job': 'Supervising Sound Editor', 'id': 1451992},\n",
       "    {'name': 'Mark Powers', 'job': 'Animation', 'id': 1455534},\n",
       "    {'name': 'Nikki Sass', 'job': 'Set Dresser', 'id': 1469387},\n",
       "    {'name': 'Elizabeth Rainey', 'job': 'Foley', 'id': 1532614},\n",
       "    {'name': 'Diane Durant', 'job': 'Script Supervisor', 'id': 1533038},\n",
       "    {'name': 'Sarah Downer', 'job': 'Key Costumer', 'id': 1533086},\n",
       "    {'name': 'Elan Yaari', 'job': 'Chief Lighting Technician', 'id': 1533530},\n",
       "    {'name': 'Gary Edelman',\n",
       "     'job': 'Transportation Coordinator',\n",
       "     'id': 1538447},\n",
       "    {'name': 'Andrew Silver', 'job': 'Music Editor', 'id': 1546457},\n",
       "    {'name': 'Andrew Silver',\n",
       "     'job': 'Supervising Music Editor',\n",
       "     'id': 1546457},\n",
       "    {'name': 'Aaron Sowd', 'job': 'Storyboard Artist', 'id': 1549218},\n",
       "    {'name': 'Quantrell D. Colbert',\n",
       "     'job': 'Still Photographer',\n",
       "     'id': 1560972},\n",
       "    {'name': 'Dan Charbit', 'job': 'Visual Effects Supervisor', 'id': 1569340},\n",
       "    {'name': 'John Moredock', 'job': 'Set Designer', 'id': 1580943},\n",
       "    {'name': 'Sara Cobbeldick', 'job': 'Set Costumer', 'id': 1580964},\n",
       "    {'name': 'Ed White', 'job': 'Sound Mixer', 'id': 1612788},\n",
       "    {'name': 'Natasha Leonnet', 'job': 'Digital Intermediate', 'id': 1634460},\n",
       "    {'name': 'Kelly Bellini', 'job': 'Stunt Double', 'id': 1635195},\n",
       "    {'name': 'Carole-Anne Hébert',\n",
       "     'job': 'Visual Effects Coordinator',\n",
       "     'id': 1637293},\n",
       "    {'name': 'Cynthia Mourou',\n",
       "     'job': 'Visual Effects Producer',\n",
       "     'id': 1637298},\n",
       "    {'name': 'Margaux Susi', 'job': 'Casting Assistant', 'id': 1660709},\n",
       "    {'name': 'Dylan Jury', 'job': 'Casting Associate', 'id': 1660711},\n",
       "    {'name': 'Ryan Bradley', 'job': 'Animation', 'id': 1713277},\n",
       "    {'name': 'Mélissa Massé',\n",
       "     'job': 'Visual Effects Coordinator',\n",
       "     'id': 1724965},\n",
       "    {'name': 'Michelle Sink Langford',\n",
       "     'job': 'Art Department Coordinator',\n",
       "     'id': 1737614},\n",
       "    {'name': 'Karen A. Felix', 'job': 'Property Master', 'id': 1737615},\n",
       "    {'name': 'Marlow Sanchez',\n",
       "     'job': 'Construction Coordinator',\n",
       "     'id': 1737616},\n",
       "    {'name': 'Greg Tresan', 'job': 'Animal Coordinator', 'id': 1737622},\n",
       "    {'name': 'Greg Tresan', 'job': 'Animal Wrangler', 'id': 1737622},\n",
       "    {'name': 'Colleen Ehrlich',\n",
       "     'job': 'Assistant Costume Designer',\n",
       "     'id': 1737626},\n",
       "    {'name': 'Keith Hudson', 'job': 'Ager/Dyer', 'id': 1737627},\n",
       "    {'name': 'Sara Pope', 'job': 'Tailor', 'id': 1737629},\n",
       "    {'name': 'Chris D. Chapman', 'job': 'Dolly Grip', 'id': 1737637},\n",
       "    {'name': 'Joe Duarte', 'job': 'Dolly Grip', 'id': 1737638},\n",
       "    {'name': 'Keith Cutler', 'job': 'Rigging Gaffer', 'id': 1737639},\n",
       "    {'name': 'Cristian Spagnuolo', 'job': 'CG Supervisor', 'id': 1737641},\n",
       "    {'name': 'Jin Yong Kim', 'job': 'Matchmove Supervisor', 'id': 1737643},\n",
       "    {'name': 'Martin Fourat', 'job': 'VFX Editor', 'id': 1737644},\n",
       "    {'name': 'Catherine Perreault', 'job': 'VFX Editor', 'id': 1737645},\n",
       "    {'name': 'Aidan Fraser',\n",
       "     'job': 'Visual Effects Supervisor',\n",
       "     'id': 1737648},\n",
       "    {'name': 'Jonathan Piche-Delorme',\n",
       "     'job': 'Visual Effects Supervisor',\n",
       "     'id': 1737649},\n",
       "    {'name': 'Tony Crowe', 'job': 'ADR & Dubbing', 'id': 1737652},\n",
       "    {'name': 'Phil Castellano Jr.', 'job': 'ADR & Dubbing', 'id': 1737653},\n",
       "    {'name': 'Judah Getz', 'job': 'ADR & Dubbing', 'id': 1737654},\n",
       "    {'name': 'Jonathan Klein', 'job': 'Foley', 'id': 1737656},\n",
       "    {'name': 'David Jobe', 'job': 'Foley Mixer', 'id': 1737660},\n",
       "    {'name': 'Kim Perrodin', 'job': 'Key Makeup Artist', 'id': 1737666},\n",
       "    {'name': 'Kurt Peterson', 'job': 'Boom Operator', 'id': 1738166},\n",
       "    {'name': 'Tracie Morrison', 'job': 'Hairstylist', 'id': 1761878},\n",
       "    {'name': 'Dave Wilson', 'job': 'ADR Voice Casting', 'id': 1773870},\n",
       "    {'name': 'Alizée Plourde',\n",
       "     'job': 'Visual Effects Coordinator',\n",
       "     'id': 1790957},\n",
       "    {'name': 'Jayme Leach Long', 'job': 'Set Designer', 'id': 1822757},\n",
       "    {'name': 'Malinda Shelley', 'job': 'Special Effects', 'id': 1822827},\n",
       "    {'name': 'Greg Pruett', 'job': 'Special Effects', 'id': 1822829},\n",
       "    {'name': 'Donny Eidson', 'job': 'Special Effects', 'id': 1822832},\n",
       "    {'name': 'Budd Lower', 'job': 'Special Effects', 'id': 1822834},\n",
       "    {'name': 'Zach Dunlap', 'job': 'Lighting Technician', 'id': 1822836},\n",
       "    {'name': 'Eric Rick Kline', 'job': 'Grip', 'id': 1822838},\n",
       "    {'name': 'Oren Malik', 'job': 'Loader', 'id': 1822840},\n",
       "    {'name': 'Carol Tresan', 'job': 'Animal Wrangler', 'id': 1825139},\n",
       "    {'name': \"David 'Rudy' Grossman\", 'job': 'CGI Supervisor', 'id': 1929023},\n",
       "    {'name': 'Lucas Glashoff',\n",
       "     'job': 'Visual Effects Coordinator',\n",
       "     'id': 2068492},\n",
       "    {'name': 'Jacqueline Hagerty',\n",
       "     'job': 'Visual Effects Coordinator',\n",
       "     'id': 2068493},\n",
       "    {'name': 'Craig Gilmore', 'job': 'Storyboard Artist', 'id': 2072492},\n",
       "    {'name': 'David Waters',\n",
       "     'job': 'Second Assistant Director',\n",
       "     'id': 2137392},\n",
       "    {'name': 'Rick Roesch', 'job': 'Payroll Accountant', 'id': 2219102},\n",
       "    {'name': 'Heather Morris', 'job': 'Hair Department Head', 'id': 2439074},\n",
       "    {'name': 'Ashley Rae Trisler', 'job': 'Utility Stunts', 'id': 2463201},\n",
       "    {'name': 'Jake Koenig', 'job': 'Grip', 'id': 2666790}],\n",
       "   'rating': 4.966,\n",
       "   'length': 102},\n",
       "  {'budget': 79000000,\n",
       "   'genres': [{'id': 12, 'name': 'Adventure'},\n",
       "    {'id': 14, 'name': 'Fantasy'},\n",
       "    {'id': 28, 'name': 'Action'}],\n",
       "   'id': 121,\n",
       "   'original_language': 'en',\n",
       "   'original_title': 'The Lord of the Rings: The Two Towers',\n",
       "   'release_date': '2002-12-18',\n",
       "   'revenue': 926287400,\n",
       "   'title': 'The Lord of the Rings: The Two Towers',\n",
       "   'cast': [{'gender': 2,\n",
       "     'id': 109,\n",
       "     'name': 'Elijah Wood',\n",
       "     'character': 'Frodo Baggins',\n",
       "     'order': 0},\n",
       "    {'gender': 2,\n",
       "     'id': 1328,\n",
       "     'name': 'Sean Astin',\n",
       "     'character': 'Samwise Gamgee',\n",
       "     'order': 1},\n",
       "    {'gender': 2,\n",
       "     'id': 1333,\n",
       "     'name': 'Andy Serkis',\n",
       "     'character': 'Gollum / Smeagol',\n",
       "     'order': 2},\n",
       "    {'gender': 2,\n",
       "     'id': 110,\n",
       "     'name': 'Viggo Mortensen',\n",
       "     'character': 'Aragorn',\n",
       "     'order': 3},\n",
       "    {'gender': 2,\n",
       "     'id': 1327,\n",
       "     'name': 'Ian McKellen',\n",
       "     'character': 'Gandalf',\n",
       "     'order': 4},\n",
       "    {'gender': 2,\n",
       "     'id': 1369,\n",
       "     'name': 'Bernard Hill',\n",
       "     'character': 'Théoden',\n",
       "     'order': 5},\n",
       "    {'gender': 2,\n",
       "     'id': 1330,\n",
       "     'name': 'Dominic Monaghan',\n",
       "     'character': 'Meriadoc \"Merry\" Brandybuck',\n",
       "     'order': 6},\n",
       "    {'gender': 2,\n",
       "     'id': 1329,\n",
       "     'name': 'Billy Boyd',\n",
       "     'character': 'Peregrin \"Pippin\" Took',\n",
       "     'order': 7},\n",
       "    {'gender': 2,\n",
       "     'id': 655,\n",
       "     'name': 'John Rhys-Davies',\n",
       "     'character': 'Gimli / Treebeard (voice)',\n",
       "     'order': 8},\n",
       "    {'gender': 2,\n",
       "     'id': 114,\n",
       "     'name': 'Orlando Bloom',\n",
       "     'character': 'Legolas',\n",
       "     'order': 9},\n",
       "    {'gender': 2,\n",
       "     'id': 113,\n",
       "     'name': 'Christopher Lee',\n",
       "     'character': 'Saruman',\n",
       "     'order': 10},\n",
       "    {'gender': 1,\n",
       "     'id': 502,\n",
       "     'name': 'Miranda Otto',\n",
       "     'character': 'Éowyn',\n",
       "     'order': 11},\n",
       "    {'gender': 2,\n",
       "     'id': 1371,\n",
       "     'name': 'David Wenham',\n",
       "     'character': 'Faramir',\n",
       "     'order': 12},\n",
       "    {'gender': 2,\n",
       "     'id': 1370,\n",
       "     'name': 'Brad Dourif',\n",
       "     'character': 'Gríma',\n",
       "     'order': 13},\n",
       "    {'gender': 2,\n",
       "     'id': 1372,\n",
       "     'name': 'Karl Urban',\n",
       "     'character': 'Éomer',\n",
       "     'order': 14},\n",
       "    {'gender': 1,\n",
       "     'id': 882,\n",
       "     'name': 'Liv Tyler',\n",
       "     'character': 'Arwen',\n",
       "     'order': 15},\n",
       "    {'gender': 1,\n",
       "     'id': 112,\n",
       "     'name': 'Cate Blanchett',\n",
       "     'character': 'Galadriel',\n",
       "     'order': 16},\n",
       "    {'gender': 2,\n",
       "     'id': 1331,\n",
       "     'name': 'Hugo Weaving',\n",
       "     'character': 'Elrond',\n",
       "     'order': 17},\n",
       "    {'gender': 2,\n",
       "     'id': 1332,\n",
       "     'name': 'Craig Parker',\n",
       "     'character': 'Haldir',\n",
       "     'order': 18},\n",
       "    {'gender': 2,\n",
       "     'id': 173431,\n",
       "     'name': 'Bruce Allpress',\n",
       "     'character': 'Aldor',\n",
       "     'order': 19},\n",
       "    {'gender': 2,\n",
       "     'id': 29094,\n",
       "     'name': 'John Bach',\n",
       "     'character': 'Madril',\n",
       "     'order': 20},\n",
       "    {'gender': 2,\n",
       "     'id': 1366,\n",
       "     'name': 'Sala Baker',\n",
       "     'character': 'Man Flesh Uruk',\n",
       "     'order': 21},\n",
       "    {'gender': 2,\n",
       "     'id': 173451,\n",
       "     'name': 'Jed Brophy',\n",
       "     'character': 'Sharku / Snaga',\n",
       "     'order': 22},\n",
       "    {'gender': 2,\n",
       "     'id': 1892757,\n",
       "     'name': 'Sam Comery',\n",
       "     'character': 'Eothain',\n",
       "     'order': 23},\n",
       "    {'gender': 2,\n",
       "     'id': 1356914,\n",
       "     'name': 'Calum Gittins',\n",
       "     'character': 'Haleth',\n",
       "     'order': 24},\n",
       "    {'gender': 2,\n",
       "     'id': 1511634,\n",
       "     'name': 'Phil Grieve',\n",
       "     'character': 'Hero Orc',\n",
       "     'order': 25},\n",
       "    {'gender': 2,\n",
       "     'id': 1214345,\n",
       "     'name': 'Bruce Hopkins',\n",
       "     'character': 'Gamling',\n",
       "     'order': 26},\n",
       "    {'gender': 2,\n",
       "     'id': 2082663,\n",
       "     'name': 'Paris Howe Strewe',\n",
       "     'character': 'Théodred',\n",
       "     'order': 27},\n",
       "    {'gender': 2,\n",
       "     'id': 41784,\n",
       "     'name': 'Nathaniel Lees',\n",
       "     'character': 'Ugluk',\n",
       "     'order': 28},\n",
       "    {'gender': 2,\n",
       "     'id': 76851,\n",
       "     'name': 'John Leigh',\n",
       "     'character': 'Háma',\n",
       "     'order': 29},\n",
       "    {'gender': 2,\n",
       "     'id': 76834,\n",
       "     'name': 'Robbie Magasiva',\n",
       "     'character': 'Mauhúr',\n",
       "     'order': 30},\n",
       "    {'gender': 1,\n",
       "     'id': 125938,\n",
       "     'name': 'Robyn Malcolm',\n",
       "     'character': 'Morwen',\n",
       "     'order': 31},\n",
       "    {'gender': 2,\n",
       "     'id': 29082,\n",
       "     'name': 'Bruce Phillips',\n",
       "     'character': 'Rohan Soldier',\n",
       "     'order': 32},\n",
       "    {'gender': 2,\n",
       "     'id': 129394,\n",
       "     'name': 'Robert Pollock',\n",
       "     'character': 'Mordor Orc',\n",
       "     'order': 33},\n",
       "    {'gender': 1,\n",
       "     'id': 941439,\n",
       "     'name': 'Olivia Tennet',\n",
       "     'character': 'Freda',\n",
       "     'order': 34},\n",
       "    {'gender': 2,\n",
       "     'id': 156371,\n",
       "     'name': 'Raymond Trickitt',\n",
       "     'character': 'Bereg',\n",
       "     'order': 35},\n",
       "    {'gender': 2,\n",
       "     'id': 1440014,\n",
       "     'name': 'Stephen Ure',\n",
       "     'character': 'Grishnakh',\n",
       "     'order': 36},\n",
       "    {'gender': 2,\n",
       "     'id': 1201351,\n",
       "     'name': 'Billy Jackson',\n",
       "     'character': 'Cute Rohan Refugee Child',\n",
       "     'order': 37},\n",
       "    {'gender': 1,\n",
       "     'id': 2082669,\n",
       "     'name': 'Katie Jackson',\n",
       "     'character': 'Cute Rohan Refugee Child',\n",
       "     'order': 38},\n",
       "    {'gender': 2,\n",
       "     'id': 48,\n",
       "     'name': 'Sean Bean',\n",
       "     'character': 'Boromir (uncredited)',\n",
       "     'order': 39},\n",
       "    {'gender': 2,\n",
       "     'id': 1381,\n",
       "     'name': 'John Noble',\n",
       "     'character': 'Denethor (uncredited)',\n",
       "     'order': 40},\n",
       "    {'gender': 1,\n",
       "     'id': 1201337,\n",
       "     'name': 'Victoria Beynon-Cole',\n",
       "     'character': 'Hero Orc (uncredited)',\n",
       "     'order': 41},\n",
       "    {'gender': 0,\n",
       "     'id': 2082666,\n",
       "     'name': 'Lee Hartley',\n",
       "     'character': 'Hero Orc (uncredited)',\n",
       "     'order': 42},\n",
       "    {'gender': 0,\n",
       "     'id': 2155635,\n",
       "     'name': 'Frazer Anderson',\n",
       "     'character': 'Orc / Ranger (uncredited)',\n",
       "     'order': 43},\n",
       "    {'gender': 2,\n",
       "     'id': 1641201,\n",
       "     'name': 'Ben Barrington',\n",
       "     'character': 'Gondorian Soldier / Ranger / Orc (uncredited)',\n",
       "     'order': 44},\n",
       "    {'gender': 0,\n",
       "     'id': 2082709,\n",
       "     'name': 'Jarl Benzon',\n",
       "     'character': 'Elf Warrior / Rohan Stable Boy (uncredited)',\n",
       "     'order': 45},\n",
       "    {'gender': 0,\n",
       "     'id': 2082697,\n",
       "     'name': 'Jørn Benzon',\n",
       "     'character': 'Orolonn (uncredited)',\n",
       "     'order': 46},\n",
       "    {'gender': 2,\n",
       "     'id': 173500,\n",
       "     'name': 'Owen Black',\n",
       "     'character': 'Rivendell Elf (uncredited)',\n",
       "     'order': 47},\n",
       "    {'gender': 0,\n",
       "     'id': 2082710,\n",
       "     'name': 'Dorothy Anne Bonner',\n",
       "     'character': 'Rohan Woman (uncredited)',\n",
       "     'order': 48},\n",
       "    {'gender': 0,\n",
       "     'id': 2082679,\n",
       "     'name': 'Ben Britton',\n",
       "     'character': 'Fereveldir (uncredited)',\n",
       "     'order': 49},\n",
       "    {'gender': 0,\n",
       "     'id': 2082708,\n",
       "     'name': 'Riley Brophy',\n",
       "     'character': 'Rohan Refugee Child (uncredited)',\n",
       "     'order': 50},\n",
       "    {'gender': 2,\n",
       "     'id': 186469,\n",
       "     'name': 'Alistair Browning',\n",
       "     'character': 'Damrod (uncredited)',\n",
       "     'order': 51},\n",
       "    {'gender': 1,\n",
       "     'id': 571568,\n",
       "     'name': 'Alix Bushnell',\n",
       "     'character': 'Rohan Refugee (uncredited)',\n",
       "     'order': 52},\n",
       "    {'gender': 2,\n",
       "     'id': 1447518,\n",
       "     'name': 'Sean Button',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 53},\n",
       "    {'gender': 0,\n",
       "     'id': 1964391,\n",
       "     'name': 'Ryan Carey',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 54},\n",
       "    {'gender': 2,\n",
       "     'id': 1628130,\n",
       "     'name': 'Rodney Cook',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 55},\n",
       "    {'gender': 0,\n",
       "     'id': 1079558,\n",
       "     'name': 'Augie Davis',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 56},\n",
       "    {'gender': 2,\n",
       "     'id': 1774435,\n",
       "     'name': 'Mana Hira Davis',\n",
       "     'character': 'Gondorian Soldier / Harad Warrior / Orc / Rohan Soldier / Uruk-hai (uncredited)',\n",
       "     'order': 57},\n",
       "    {'gender': 2,\n",
       "     'id': 1434944,\n",
       "     'name': 'Shane Dawson',\n",
       "     'character': 'Harad Warrior / Uruk-hai (uncredited)',\n",
       "     'order': 58},\n",
       "    {'gender': 0,\n",
       "     'id': 558300,\n",
       "     'name': 'Karlos Drinkwater',\n",
       "     'character': 'Easterling Warrior (uncredited)',\n",
       "     'order': 59},\n",
       "    {'gender': 2,\n",
       "     'id': 132632,\n",
       "     'name': 'Aron Eastwood',\n",
       "     'character': 'Rohan Soldier (uncredited)',\n",
       "     'order': 60},\n",
       "    {'gender': 2,\n",
       "     'id': 1064428,\n",
       "     'name': 'Frank Edwards',\n",
       "     'character': 'Rohan Man (uncredited)',\n",
       "     'order': 61},\n",
       "    {'gender': 2,\n",
       "     'id': 2095537,\n",
       "     'name': 'Clint Elvy',\n",
       "     'character': 'Harad Warrior (uncredited)',\n",
       "     'order': 62},\n",
       "    {'gender': 0,\n",
       "     'id': 1475104,\n",
       "     'name': 'Alexia Fairbrother',\n",
       "     'character': 'Elf Warrior (uncredited)',\n",
       "     'order': 63},\n",
       "    {'gender': 2,\n",
       "     'id': 2082714,\n",
       "     'name': 'Daniel Falconer',\n",
       "     'character': 'Elf Warrior / Rivendell Elf (uncredited)',\n",
       "     'order': 64},\n",
       "    {'gender': 2,\n",
       "     'id': 1140092,\n",
       "     'name': 'Siaosi Fonua',\n",
       "     'character': 'Orc / Uruk-hai (uncredited)',\n",
       "     'order': 65},\n",
       "    {'gender': 0,\n",
       "     'id': 2082662,\n",
       "     'name': 'Kester Fordham',\n",
       "     'character': 'Anglor (uncredited)',\n",
       "     'order': 66},\n",
       "    {'gender': 0,\n",
       "     'id': 2595022,\n",
       "     'name': 'Michael Fowler',\n",
       "     'character': 'Elf (uncredited)',\n",
       "     'order': 67},\n",
       "    {'gender': 2,\n",
       "     'id': 1439931,\n",
       "     'name': 'Ben Fransham',\n",
       "     'character': 'Anendel / Thandronen (uncredited)',\n",
       "     'order': 68},\n",
       "    {'gender': 0,\n",
       "     'id': 2082718,\n",
       "     'name': 'Frank Goldingham',\n",
       "     'character': 'Rohan Refugee (uncredited)',\n",
       "     'order': 69},\n",
       "    {'gender': 2,\n",
       "     'id': 2505313,\n",
       "     'name': 'Winham Hammond',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 70},\n",
       "    {'gender': 2,\n",
       "     'id': 2082755,\n",
       "     'name': 'Jonathan Harding',\n",
       "     'character': 'Elf Warrior (uncredited)',\n",
       "     'order': 71},\n",
       "    {'gender': 0,\n",
       "     'id': 1232268,\n",
       "     'name': 'Lucas Hayward',\n",
       "     'character': 'Rohan Boy (uncredited)',\n",
       "     'order': 72},\n",
       "    {'gender': 2,\n",
       "     'id': 1373,\n",
       "     'name': 'Dan Hennah',\n",
       "     'character': 'Rohan Recruit (uncredited)',\n",
       "     'order': 73},\n",
       "    {'gender': 2,\n",
       "     'id': 1292753,\n",
       "     'name': 'Jason Hood',\n",
       "     'character': \"Théoden's Royal Guard (uncredited)\",\n",
       "     'order': 74},\n",
       "    {'gender': 1,\n",
       "     'id': 1802028,\n",
       "     'name': 'Lani Jackson',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 75},\n",
       "    {'gender': 2,\n",
       "     'id': 108,\n",
       "     'name': 'Peter Jackson',\n",
       "     'character': 'Spear-Throwing Rohan Soldier (uncredited)',\n",
       "     'order': 76},\n",
       "    {'gender': 0,\n",
       "     'id': 2082695,\n",
       "     'name': 'Gareth Jensen',\n",
       "     'character': 'Elf Warrior (uncredited)',\n",
       "     'order': 77},\n",
       "    {'gender': 2,\n",
       "     'id': 2082705,\n",
       "     'name': 'Sam Kelly',\n",
       "     'character': 'Elf Warrior / Uruk-hai (uncredited)',\n",
       "     'order': 78},\n",
       "    {'gender': 2,\n",
       "     'id': 67134,\n",
       "     'name': 'Richard Knowles',\n",
       "     'character': 'Rohan Soldier (uncredited)',\n",
       "     'order': 79},\n",
       "    {'gender': 2,\n",
       "     'id': 1674266,\n",
       "     'name': 'Sandro Kopp',\n",
       "     'character': 'Elven Warrior (uncredited)',\n",
       "     'order': 80},\n",
       "    {'gender': 0,\n",
       "     'id': 2082762,\n",
       "     'name': 'Sam La Hood',\n",
       "     'character': 'Orc Pitmaster (uncredited)',\n",
       "     'order': 81},\n",
       "    {'gender': 0,\n",
       "     'id': 2553583,\n",
       "     'name': 'Don Langridge',\n",
       "     'character': 'Rohan Guard (uncredited)',\n",
       "     'order': 82},\n",
       "    {'gender': 2,\n",
       "     'id': 2531569,\n",
       "     'name': 'Michael Lawrence',\n",
       "     'character': 'Wildman (uncredited)',\n",
       "     'order': 83},\n",
       "    {'gender': 2,\n",
       "     'id': 1320,\n",
       "     'name': 'Alan Lee',\n",
       "     'character': 'Rohan Recruit (uncredited)',\n",
       "     'order': 84},\n",
       "    {'gender': 2,\n",
       "     'id': 2082767,\n",
       "     'name': 'Jono Manks',\n",
       "     'character': 'Twilight Ringwraith (archive footage) (uncredited)',\n",
       "     'order': 85},\n",
       "    {'gender': 2,\n",
       "     'id': 1590835,\n",
       "     'name': 'Brent McIntyre',\n",
       "     'character': 'Witch-king (archive footage) (uncredited)',\n",
       "     'order': 86},\n",
       "    {'gender': 1,\n",
       "     'id': 1349014,\n",
       "     'name': 'Dra McKay',\n",
       "     'character': 'Rohan Woman (uncredited)',\n",
       "     'order': 87},\n",
       "    {'gender': 2,\n",
       "     'id': 1201399,\n",
       "     'name': 'Joseph Mika-Hunt',\n",
       "     'character': 'Uruk-hai / Gondorian Soldier (uncredited)',\n",
       "     'order': 88},\n",
       "    {'gender': 2,\n",
       "     'id': 1947882,\n",
       "     'name': 'Dean Morganty',\n",
       "     'character': 'Haradrim Warrior / Ranger / Uruk-hai (uncredited)',\n",
       "     'order': 89},\n",
       "    {'gender': 2,\n",
       "     'id': 2082731,\n",
       "     'name': 'Henry Mortensen',\n",
       "     'character': 'Rohan Boy Recruit (uncredited)',\n",
       "     'order': 90},\n",
       "    {'gender': 2,\n",
       "     'id': 1702561,\n",
       "     'name': 'Francis Mountjoy',\n",
       "     'character': 'Elf / Gondorian Soldier / Orc / Uruk-hai (uncredited)',\n",
       "     'order': 91},\n",
       "    {'gender': 2,\n",
       "     'id': 1382,\n",
       "     'name': 'Paul Norell',\n",
       "     'character': 'Easterling (uncredited)',\n",
       "     'order': 92},\n",
       "    {'gender': 2,\n",
       "     'id': 123,\n",
       "     'name': 'Barrie M. Osborne',\n",
       "     'character': 'Rock-throwing Rohan Soldier (uncredited)',\n",
       "     'order': 93},\n",
       "    {'gender': 2,\n",
       "     'id': 132639,\n",
       "     'name': 'Allan Poppleton',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 94},\n",
       "    {'gender': 2,\n",
       "     'id': 235023,\n",
       "     'name': 'Gareth Reeves',\n",
       "     'character': 'Fighting Elf (uncredited)',\n",
       "     'order': 95},\n",
       "    {'gender': 1,\n",
       "     'id': 1016177,\n",
       "     'name': 'Miranda Rivers',\n",
       "     'character': 'Rohan Refugee (uncredited)',\n",
       "     'order': 96},\n",
       "    {'gender': 2,\n",
       "     'id': 1399823,\n",
       "     'name': 'Campbell Rousselle',\n",
       "     'character': 'Tree-cutting Orc (uncredited)',\n",
       "     'order': 97},\n",
       "    {'gender': 2,\n",
       "     'id': 1340023,\n",
       "     'name': 'Matthew J. Saville',\n",
       "     'character': 'Gondorian Soldier (uncredited)',\n",
       "     'order': 98},\n",
       "    {'gender': 2,\n",
       "     'id': 2082732,\n",
       "     'name': 'Samuel E. Shore',\n",
       "     'character': 'Rohan Refugee / Elf (uncredited)',\n",
       "     'order': 99},\n",
       "    {'gender': 2,\n",
       "     'id': 1484140,\n",
       "     'name': 'Allan Smith',\n",
       "     'character': 'Dead Marshes Elf (uncredited)',\n",
       "     'order': 100},\n",
       "    {'gender': 2,\n",
       "     'id': 2082734,\n",
       "     'name': 'Greg Tozer',\n",
       "     'character': 'Conscripting Rohan Soldier (uncredited)',\n",
       "     'order': 101},\n",
       "    {'gender': 2,\n",
       "     'id': 236710,\n",
       "     'name': 'Piripi Waretini',\n",
       "     'character': 'Uruk-hai Warrior (uncredited)',\n",
       "     'order': 102},\n",
       "    {'gender': 2,\n",
       "     'id': 226504,\n",
       "     'name': 'Tim Wong',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 103},\n",
       "    {'gender': 2,\n",
       "     'id': 1097645,\n",
       "     'name': 'John Wraight',\n",
       "     'character': 'Stable Hand (uncredited)',\n",
       "     'order': 104},\n",
       "    {'gender': 1,\n",
       "     'id': 1961636,\n",
       "     'name': 'Kelley Kerr Young',\n",
       "     'character': 'Rohan Refugee (uncredited)',\n",
       "     'order': 105},\n",
       "    {'gender': 2,\n",
       "     'id': 122356,\n",
       "     'name': 'Robert Young',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 106}],\n",
       "   'crew': [{'name': 'Barrie M. Osborne', 'job': 'Producer', 'id': 123},\n",
       "    {'name': 'Howard Shore', 'job': 'Original Music Composer', 'id': 117},\n",
       "    {'name': 'Christopher Boyes',\n",
       "     'job': 'Sound Re-Recording Mixer',\n",
       "     'id': 900},\n",
       "    {'name': 'Peter Jackson', 'job': 'Screenplay', 'id': 108},\n",
       "    {'name': 'Peter Jackson', 'job': 'Director', 'id': 108},\n",
       "    {'name': 'Peter Jackson', 'job': 'Producer', 'id': 108},\n",
       "    {'name': 'Bob Weinstein', 'job': 'Executive Producer', 'id': 1307},\n",
       "    {'name': 'Harvey Weinstein', 'job': 'Executive Producer', 'id': 59839},\n",
       "    {'name': 'Mark Ordesky', 'job': 'Executive Producer', 'id': 1309},\n",
       "    {'name': 'Michael Lynne', 'job': 'Executive Producer', 'id': 1311},\n",
       "    {'name': 'J.R.R. Tolkien', 'job': 'Novel', 'id': 129},\n",
       "    {'name': 'Fran Walsh', 'job': 'Screenplay', 'id': 126},\n",
       "    {'name': 'Fran Walsh', 'job': 'Producer', 'id': 126},\n",
       "    {'name': 'Philippa Boyens', 'job': 'Screenplay', 'id': 128},\n",
       "    {'name': 'Andrew Lesnie', 'job': 'Director of Photography', 'id': 1313},\n",
       "    {'name': 'Grant Major', 'job': 'Production Design', 'id': 1314},\n",
       "    {'name': 'Joe Bleakley', 'job': 'Art Direction', 'id': 1316},\n",
       "    {'name': 'Philip Ivey', 'job': 'Art Direction', 'id': 1317},\n",
       "    {'name': 'Rob Outterside', 'job': 'Art Direction', 'id': 1318},\n",
       "    {'name': 'Mark Robins', 'job': 'Art Direction', 'id': 1319},\n",
       "    {'name': 'Alan Lee', 'job': 'Set Decoration', 'id': 1320},\n",
       "    {'name': 'Alan Lee', 'job': 'Conceptual Design', 'id': 1320},\n",
       "    {'name': 'John Howe', 'job': 'Set Decoration', 'id': 1321},\n",
       "    {'name': 'John Howe', 'job': 'Conceptual Design', 'id': 1321},\n",
       "    {'name': 'Ngila Dickson', 'job': 'Costume Design', 'id': 1322},\n",
       "    {'name': 'Richard Taylor', 'job': 'Costume Design', 'id': 1323},\n",
       "    {'name': 'Victoria Burrows', 'job': 'Casting', 'id': 1324},\n",
       "    {'name': 'John Hubbard', 'job': 'Casting', 'id': 1325},\n",
       "    {'name': 'Liz Mullane', 'job': 'Casting', 'id': 1326},\n",
       "    {'name': 'Sala Baker', 'job': 'Stunts', 'id': 1366},\n",
       "    {'name': 'Dan Hennah', 'job': 'Set Decoration', 'id': 1373},\n",
       "    {'name': 'Dan Hennah', 'job': 'Supervising Art Director', 'id': 1373},\n",
       "    {'name': 'Michael Horton', 'job': 'Editor', 'id': 1376},\n",
       "    {'name': 'Jabez Olssen', 'job': 'Additional Editor', 'id': 1377},\n",
       "    {'name': 'Brent Burge', 'job': 'Sound Effects Editor', 'id': 3503},\n",
       "    {'name': 'David Farmer', 'job': 'Sound Designer', 'id': 3504},\n",
       "    {'name': 'Robert Shaye', 'job': 'Executive Producer', 'id': 13663},\n",
       "    {'name': 'Kyrsten Mate', 'job': 'Sound Effects Editor', 'id': 5338},\n",
       "    {'name': 'Jules Cook', 'job': 'Assistant Art Director', 'id': 9420},\n",
       "    {'name': 'Jim Berney', 'job': 'Visual Effects Supervisor', 'id': 10974},\n",
       "    {'name': 'Jeremy Woodhead', 'job': 'Makeup Artist', 'id': 40802},\n",
       "    {'name': 'Stephen Sinclair', 'job': 'Screenplay', 'id': 11325},\n",
       "    {'name': 'Rick Findlater', 'job': 'Makeup Artist', 'id': 52165},\n",
       "    {'name': 'Ann Robinson', 'job': 'Casting', 'id': 61624},\n",
       "    {'name': \"Casey O'Neill\", 'job': 'Stunts', 'id': 92499},\n",
       "    {'name': 'Margaret Aston', 'job': 'Makeup Artist', 'id': 75482},\n",
       "    {'name': 'Noreen Wilkie', 'job': 'Makeup Artist', 'id': 75486},\n",
       "    {'name': 'Janine Schneider', 'job': 'Makeup Artist', 'id': 117210},\n",
       "    {'name': 'Andrew Jack', 'job': 'Dialect Coach', 'id': 240629},\n",
       "    {'name': 'Paul Lasaine',\n",
       "     'job': 'Visual Effects Art Director',\n",
       "     'id': 957354},\n",
       "    {'name': 'Amy Hubbard', 'job': 'Casting', 'id': 1016176},\n",
       "    {'name': 'John McKay', 'job': 'Sound Effects Editor', 'id': 1182839},\n",
       "    {'name': 'Charlie McClellan',\n",
       "     'job': 'Visual Effects Producer',\n",
       "     'id': 1310062},\n",
       "    {'name': 'Dean Lyon', 'job': 'Visual Effects Supervisor', 'id': 1360001},\n",
       "    {'name': 'Ethan van der Ryn',\n",
       "     'job': 'Supervising Sound Editor',\n",
       "     'id': 1378696},\n",
       "    {'name': 'Michael Semanick',\n",
       "     'job': 'Sound Re-Recording Mixer',\n",
       "     'id': 1378828},\n",
       "    {'name': 'John Clinton', 'job': 'Visual Effects Producer', 'id': 1399315},\n",
       "    {'name': 'Alex Funke', 'job': 'Visual Effects Director', 'id': 1401114},\n",
       "    {'name': 'Guy Williams', 'job': '3D Supervisor', 'id': 1401803},\n",
       "    {'name': 'Mike Hopkins', 'job': 'Supervising Sound Editor', 'id': 1404763},\n",
       "    {'name': 'Dave Whitehead', 'job': 'Sound Effects Editor', 'id': 1406066},\n",
       "    {'name': 'Michael Hedges',\n",
       "     'job': 'Sound Re-Recording Mixer',\n",
       "     'id': 1406069},\n",
       "    {'name': 'Joe Letteri', 'job': 'Visual Effects Supervisor', 'id': 1418395},\n",
       "    {'name': 'Christian Rivers',\n",
       "     'job': 'Visual Effects Designer',\n",
       "     'id': 1419579},\n",
       "    {'name': 'Hayden Collow', 'job': 'Sound Effects Editor', 'id': 1424612},\n",
       "    {'name': 'Gary Summers',\n",
       "     'job': 'Additional Sound Re-Recording Mixer',\n",
       "     'id': 1425978},\n",
       "    {'name': 'Jim Rygiel', 'job': 'Visual Effects Supervisor', 'id': 1428201},\n",
       "    {'name': 'Sean Button', 'job': 'Stunts', 'id': 1447518},\n",
       "    {'name': 'Eileen Moran', 'job': 'Visual Effects Producer', 'id': 1449177},\n",
       "    {'name': 'Randall William Cook',\n",
       "     'job': 'Animation Supervisor',\n",
       "     'id': 1452721},\n",
       "    {'name': 'Shane Prigmore', 'job': 'Animation', 'id': 1453498},\n",
       "    {'name': 'Nancy Hennah', 'job': 'Makeup Artist', 'id': 1457304},\n",
       "    {'name': 'Catherine Maguire', 'job': 'Makeup Artist', 'id': 1457308},\n",
       "    {'name': 'Roisin Carty', 'job': 'Dialect Coach', 'id': 1457374},\n",
       "    {'name': 'Roger Huynh', 'job': 'Compositors', 'id': 1460602},\n",
       "    {'name': 'Rick Porras', 'job': 'Co-Producer', 'id': 1477006},\n",
       "    {'name': 'Angela Mooar', 'job': 'Makeup Artist', 'id': 1544478},\n",
       "    {'name': 'Gail Wilson', 'job': 'Makeup Artist', 'id': 1546435},\n",
       "    {'name': 'Samantha Morley', 'job': 'Set Costumer', 'id': 1554884},\n",
       "    {'name': 'Davina Lamont', 'job': 'Makeup Artist', 'id': 1569347},\n",
       "    {'name': 'Dean Wright', 'job': 'Visual Effects Producer', 'id': 1580896},\n",
       "    {'name': 'Ken Saville', 'job': 'Sound Recordist', 'id': 1583559},\n",
       "    {'name': 'Victoria Mielewska', 'job': 'Dialect Coach', 'id': 1635601},\n",
       "    {'name': 'Craig Tomlinson', 'job': 'Sound Effects Editor', 'id': 1860342},\n",
       "    {'name': 'Jacqui Allen', 'job': 'Assistant Art Director', 'id': 1929750},\n",
       "    {'name': 'Jeremy Bennett',\n",
       "     'job': 'Visual Effects Art Director',\n",
       "     'id': 1929751},\n",
       "    {'name': 'Hammond Peek', 'job': 'Production Sound Mixer', 'id': 1929766},\n",
       "    {'name': 'Vivienne MacGillicuddy', 'job': 'Makeup Artist', 'id': 1936268},\n",
       "    {'name': 'Malcolm Cromie', 'job': 'Sound Recordist', 'id': 1936289},\n",
       "    {'name': 'Ross McGarva', 'job': 'Assistant Art Director', 'id': 2076368},\n",
       "    {'name': 'Daniel Falconer', 'job': 'Sculptor', 'id': 2082714},\n",
       "    {'name': 'Kerryn Flewell-Smith', 'job': 'Makeup Artist', 'id': 2090010},\n",
       "    {'name': 'Steve Hopgood', 'job': 'Makeup Artist', 'id': 2090011},\n",
       "    {'name': 'Mark Kinaston-Smith', 'job': 'Makeup Artist', 'id': 2090012},\n",
       "    {'name': 'Emma Moncrieff', 'job': 'Makeup Artist', 'id': 2090020},\n",
       "    {'name': 'Allie Rutherford', 'job': 'Makeup Artist', 'id': 2090023},\n",
       "    {'name': 'Lenore Stewart', 'job': 'Makeup Artist', 'id': 2090024},\n",
       "    {'name': 'Tanya Travis', 'job': 'Makeup Artist', 'id': 2090025},\n",
       "    {'name': 'Tera Treanor', 'job': 'Makeup Artist', 'id': 2090028},\n",
       "    {'name': 'Laurelle Ziento', 'job': 'Makeup Artist', 'id': 2090050},\n",
       "    {'name': 'Robyn Isaacs', 'job': 'Visual Effects Producer', 'id': 2090062},\n",
       "    {'name': 'Jamie Beswarick', 'job': 'Sculptor', 'id': 2152323},\n",
       "    {'name': 'Craig Clarke', 'job': 'Compositing Supervisor', 'id': 4166643}],\n",
       "   'oscar_awards': [{'year_ceremony': 2003,\n",
       "     'ceremony': 75,\n",
       "     'category': 'ART DIRECTION',\n",
       "     'name': 'Art Direction:  Grant Major; Set Decoration:  Dan Hennah and Alan Lee',\n",
       "     'film': 'The Lord of the Rings: The Two Towers',\n",
       "     'winner': False},\n",
       "    {'year_ceremony': 2003,\n",
       "     'ceremony': 75,\n",
       "     'category': 'FILM EDITING',\n",
       "     'name': 'Michael Horton',\n",
       "     'film': 'The Lord of the Rings: The Two Towers',\n",
       "     'winner': False},\n",
       "    {'year_ceremony': 2003,\n",
       "     'ceremony': 75,\n",
       "     'category': 'BEST PICTURE',\n",
       "     'name': 'Barrie M. Osborne, Fran Walsh and Peter Jackson, Producers',\n",
       "     'film': 'The Lord of the Rings: The Two Towers',\n",
       "     'winner': False},\n",
       "    {'year_ceremony': 2003,\n",
       "     'ceremony': 75,\n",
       "     'category': 'SOUND',\n",
       "     'name': 'Christopher Boyes, Michael Semanick, Michael Hedges, Hammond Peek',\n",
       "     'film': 'The Lord of the Rings: The Two Towers',\n",
       "     'winner': False},\n",
       "    {'year_ceremony': 2003,\n",
       "     'ceremony': 75,\n",
       "     'category': 'SOUND EDITING',\n",
       "     'name': 'Ethan Van der Ryn, Michael Hopkins',\n",
       "     'film': 'The Lord of the Rings: The Two Towers',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2003,\n",
       "     'ceremony': 75,\n",
       "     'category': 'VISUAL EFFECTS',\n",
       "     'name': 'Jim Rygiel, Joe Letteri, Randall William Cook, Alex Funke',\n",
       "     'film': 'The Lord of the Rings: The Two Towers',\n",
       "     'winner': True}],\n",
       "   'rating': 8.392,\n",
       "   'length': 179},\n",
       "  {'budget': 0,\n",
       "   'genres': [{'id': 99, 'name': 'Documentary'}],\n",
       "   'id': 296260,\n",
       "   'original_language': 'en',\n",
       "   'original_title': \"Master of the Rings: The Unauthorized Story Behind J.R.R. Tolkien's 'Lord of the Rings'\",\n",
       "   'release_date': '2001-12-04',\n",
       "   'revenue': 0,\n",
       "   'title': \"Master of the Rings: The Unauthorized Story Behind J.R.R. Tolkien's 'Lord of the Rings'\",\n",
       "   'cast': [],\n",
       "   'crew': [{'name': 'Stephen Grant', 'job': 'Director', 'id': 1371554}],\n",
       "   'rating': 9.0,\n",
       "   'length': 80},\n",
       "  {'budget': 94000000,\n",
       "   'genres': [{'id': 12, 'name': 'Adventure'},\n",
       "    {'id': 14, 'name': 'Fantasy'},\n",
       "    {'id': 28, 'name': 'Action'}],\n",
       "   'id': 122,\n",
       "   'original_language': 'en',\n",
       "   'original_title': 'The Lord of the Rings: The Return of the King',\n",
       "   'release_date': '2003-12-01',\n",
       "   'revenue': 1118888979,\n",
       "   'title': 'The Lord of the Rings: The Return of the King',\n",
       "   'cast': [{'gender': 2,\n",
       "     'id': 109,\n",
       "     'name': 'Elijah Wood',\n",
       "     'character': 'Frodo Baggins',\n",
       "     'order': 0},\n",
       "    {'gender': 2,\n",
       "     'id': 1328,\n",
       "     'name': 'Sean Astin',\n",
       "     'character': 'Samwise Gamgee',\n",
       "     'order': 1},\n",
       "    {'gender': 2,\n",
       "     'id': 110,\n",
       "     'name': 'Viggo Mortensen',\n",
       "     'character': 'Aragorn',\n",
       "     'order': 2},\n",
       "    {'gender': 2,\n",
       "     'id': 1327,\n",
       "     'name': 'Ian McKellen',\n",
       "     'character': 'Gandalf',\n",
       "     'order': 3},\n",
       "    {'gender': 2,\n",
       "     'id': 1333,\n",
       "     'name': 'Andy Serkis',\n",
       "     'character': 'Gollum / Smeagol',\n",
       "     'order': 4},\n",
       "    {'gender': 2,\n",
       "     'id': 1330,\n",
       "     'name': 'Dominic Monaghan',\n",
       "     'character': 'Meriadoc \"Merry\" Brandybuck',\n",
       "     'order': 5},\n",
       "    {'gender': 2,\n",
       "     'id': 1329,\n",
       "     'name': 'Billy Boyd',\n",
       "     'character': 'Peregrin \"Pippin\" Took',\n",
       "     'order': 6},\n",
       "    {'gender': 2,\n",
       "     'id': 1381,\n",
       "     'name': 'John Noble',\n",
       "     'character': 'Denethor',\n",
       "     'order': 7},\n",
       "    {'gender': 2,\n",
       "     'id': 1371,\n",
       "     'name': 'David Wenham',\n",
       "     'character': 'Faramir',\n",
       "     'order': 8},\n",
       "    {'gender': 1,\n",
       "     'id': 502,\n",
       "     'name': 'Miranda Otto',\n",
       "     'character': 'Éowyn',\n",
       "     'order': 9},\n",
       "    {'gender': 2,\n",
       "     'id': 655,\n",
       "     'name': 'John Rhys-Davies',\n",
       "     'character': 'Gimli / Treebeard (voice)',\n",
       "     'order': 10},\n",
       "    {'gender': 2,\n",
       "     'id': 114,\n",
       "     'name': 'Orlando Bloom',\n",
       "     'character': 'Legolas',\n",
       "     'order': 11},\n",
       "    {'gender': 2,\n",
       "     'id': 1369,\n",
       "     'name': 'Bernard Hill',\n",
       "     'character': 'Théoden',\n",
       "     'order': 12},\n",
       "    {'gender': 2,\n",
       "     'id': 1372,\n",
       "     'name': 'Karl Urban',\n",
       "     'character': 'Éomer',\n",
       "     'order': 13},\n",
       "    {'gender': 2,\n",
       "     'id': 1365,\n",
       "     'name': 'Lawrence Makoare',\n",
       "     'character': 'Witchking / Gothmog',\n",
       "     'order': 14},\n",
       "    {'gender': 1,\n",
       "     'id': 882,\n",
       "     'name': 'Liv Tyler',\n",
       "     'character': 'Arwen',\n",
       "     'order': 15},\n",
       "    {'gender': 2,\n",
       "     'id': 1331,\n",
       "     'name': 'Hugo Weaving',\n",
       "     'character': 'Elrond',\n",
       "     'order': 16},\n",
       "    {'gender': 1,\n",
       "     'id': 112,\n",
       "     'name': 'Cate Blanchett',\n",
       "     'character': 'Galadriel',\n",
       "     'order': 17},\n",
       "    {'gender': 2,\n",
       "     'id': 65,\n",
       "     'name': 'Ian Holm',\n",
       "     'character': 'Bilbo Baggins',\n",
       "     'order': 18},\n",
       "    {'gender': 2,\n",
       "     'id': 48,\n",
       "     'name': 'Sean Bean',\n",
       "     'character': 'Boromir',\n",
       "     'order': 19},\n",
       "    {'gender': 2,\n",
       "     'id': 20982,\n",
       "     'name': 'Marton Csokas',\n",
       "     'character': 'Celeborn',\n",
       "     'order': 20},\n",
       "    {'gender': 2,\n",
       "     'id': 1382,\n",
       "     'name': 'Paul Norell',\n",
       "     'character': 'King of the Dead',\n",
       "     'order': 21},\n",
       "    {'gender': 2,\n",
       "     'id': 585902,\n",
       "     'name': 'Noel Appleby',\n",
       "     'character': 'Everard Proudfoot',\n",
       "     'order': 22},\n",
       "    {'gender': 1,\n",
       "     'id': 1739002,\n",
       "     'name': 'Ali Astin',\n",
       "     'character': 'Elanor Gamgee',\n",
       "     'order': 23},\n",
       "    {'gender': 2,\n",
       "     'id': 9383,\n",
       "     'name': 'David Aston',\n",
       "     'character': 'Gondorian Soldier 3',\n",
       "     'order': 24},\n",
       "    {'gender': 2,\n",
       "     'id': 29094,\n",
       "     'name': 'John Bach',\n",
       "     'character': 'Madril',\n",
       "     'order': 25},\n",
       "    {'gender': 2,\n",
       "     'id': 1668317,\n",
       "     'name': 'Sadwyn Brophy',\n",
       "     'character': 'Eldarion',\n",
       "     'order': 26},\n",
       "    {'gender': 2,\n",
       "     'id': 186469,\n",
       "     'name': 'Alistair Browning',\n",
       "     'character': 'Damrod',\n",
       "     'order': 27},\n",
       "    {'gender': 2,\n",
       "     'id': 2089079,\n",
       "     'name': 'Richard Edge',\n",
       "     'character': 'Gondorian Soldier 1',\n",
       "     'order': 28},\n",
       "    {'gender': 2,\n",
       "     'id': 1186354,\n",
       "     'name': 'Jason Fitch',\n",
       "     'character': 'Uruk 2',\n",
       "     'order': 29},\n",
       "    {'gender': 2,\n",
       "     'id': 1214345,\n",
       "     'name': 'Bruce Hopkins',\n",
       "     'character': 'Gamling',\n",
       "     'order': 30},\n",
       "    {'gender': 2,\n",
       "     'id': 75256,\n",
       "     'name': 'Ian Hughes',\n",
       "     'character': 'Irolas',\n",
       "     'order': 31},\n",
       "    {'gender': 2,\n",
       "     'id': 105584,\n",
       "     'name': 'Bret McKenzie',\n",
       "     'character': 'Elf Escort',\n",
       "     'order': 32},\n",
       "    {'gender': 1,\n",
       "     'id': 965278,\n",
       "     'name': 'Sarah McLeod',\n",
       "     'character': 'Rosie Cotton',\n",
       "     'order': 33},\n",
       "    {'gender': 1,\n",
       "     'id': 1440015,\n",
       "     'name': 'Maisy McLeod-Riera',\n",
       "     'character': 'Baby Gamgee',\n",
       "     'order': 34},\n",
       "    {'gender': 2,\n",
       "     'id': 29082,\n",
       "     'name': 'Bruce Phillips',\n",
       "     'character': 'Grimbold',\n",
       "     'order': 35},\n",
       "    {'gender': 2,\n",
       "     'id': 25134,\n",
       "     'name': 'Shane Rangi',\n",
       "     'character': 'Harad Leader 2',\n",
       "     'order': 36},\n",
       "    {'gender': 2,\n",
       "     'id': 1336161,\n",
       "     'name': 'Todd Rippon',\n",
       "     'character': 'Harad Leader 1',\n",
       "     'order': 37},\n",
       "    {'gender': 2,\n",
       "     'id': 1383,\n",
       "     'name': 'Thomas Robins',\n",
       "     'character': 'Déagol',\n",
       "     'order': 38},\n",
       "    {'gender': 2,\n",
       "     'id': 122441,\n",
       "     'name': 'Harry Sinclair',\n",
       "     'character': 'Isildur',\n",
       "     'order': 39},\n",
       "    {'gender': 2,\n",
       "     'id': 186448,\n",
       "     'name': 'Peter Tait',\n",
       "     'character': 'Shagrat',\n",
       "     'order': 40},\n",
       "    {'gender': 2,\n",
       "     'id': 41785,\n",
       "     'name': 'Joel Tobeck',\n",
       "     'character': 'Orc Lieutenant 1',\n",
       "     'order': 41},\n",
       "    {'gender': 2,\n",
       "     'id': 1440014,\n",
       "     'name': 'Stephen Ure',\n",
       "     'character': 'Gorbag',\n",
       "     'order': 42},\n",
       "    {'gender': 2,\n",
       "     'id': 1366,\n",
       "     'name': 'Sala Baker',\n",
       "     'character': 'Featured Orc',\n",
       "     'order': 43},\n",
       "    {'gender': 2,\n",
       "     'id': 129394,\n",
       "     'name': 'Robert Pollock',\n",
       "     'character': 'Featured Orc',\n",
       "     'order': 44},\n",
       "    {'gender': 2,\n",
       "     'id': 173384,\n",
       "     'name': 'Ross Duncan',\n",
       "     'character': 'Featured Orc',\n",
       "     'order': 45},\n",
       "    {'gender': 2,\n",
       "     'id': 7249,\n",
       "     'name': 'Pete Smith',\n",
       "     'character': 'Featured Orc',\n",
       "     'order': 46},\n",
       "    {'gender': 2,\n",
       "     'id': 173451,\n",
       "     'name': 'Jed Brophy',\n",
       "     'character': 'Featured Orc',\n",
       "     'order': 47},\n",
       "    {'gender': 0,\n",
       "     'id': 2082666,\n",
       "     'name': 'Lee Hartley',\n",
       "     'character': 'Featured Orc',\n",
       "     'order': 48},\n",
       "    {'gender': 2,\n",
       "     'id': 1201351,\n",
       "     'name': 'Billy Jackson',\n",
       "     'character': 'Featured Child',\n",
       "     'order': 49},\n",
       "    {'gender': 1,\n",
       "     'id': 2082669,\n",
       "     'name': 'Katie Jackson',\n",
       "     'character': 'Featured Child',\n",
       "     'order': 50},\n",
       "    {'gender': 2,\n",
       "     'id': 1367,\n",
       "     'name': 'Alan Howard',\n",
       "     'character': 'The Ring (voice)',\n",
       "     'order': 51},\n",
       "    {'gender': 0,\n",
       "     'id': 2089117,\n",
       "     'name': 'Jane Abbott',\n",
       "     'character': 'Coronation Elf (uncredited)',\n",
       "     'order': 52},\n",
       "    {'gender': 2,\n",
       "     'id': 8682,\n",
       "     'name': 'Gino Acevedo',\n",
       "     'character': 'Corsair of Umbar (uncredited)',\n",
       "     'order': 53},\n",
       "    {'gender': 0,\n",
       "     'id': 2089118,\n",
       "     'name': 'Aidan Bell',\n",
       "     'character': 'Orc (uncredited)',\n",
       "     'order': 54},\n",
       "    {'gender': 0,\n",
       "     'id': 2082709,\n",
       "     'name': 'Jarl Benzon',\n",
       "     'character': 'Coronation Elf (uncredited)',\n",
       "     'order': 55},\n",
       "    {'gender': 0,\n",
       "     'id': 2082697,\n",
       "     'name': 'Jørn Benzon',\n",
       "     'character': 'Rivendell Elf (uncredited)',\n",
       "     'order': 56},\n",
       "    {'gender': 1,\n",
       "     'id': 2089102,\n",
       "     'name': 'Emma Deakin',\n",
       "     'character': 'Diamond of Long Cleave (uncredited)',\n",
       "     'order': 57},\n",
       "    {'gender': 2,\n",
       "     'id': 1590834,\n",
       "     'name': 'Michael Elsworth',\n",
       "     'character': 'Círdan the Shipwright (uncredited)',\n",
       "     'order': 58},\n",
       "    {'gender': 2,\n",
       "     'id': 2095537,\n",
       "     'name': 'Clint Elvy',\n",
       "     'character': 'Haradrim Warrior (uncredited)',\n",
       "     'order': 59},\n",
       "    {'gender': 0,\n",
       "     'id': 2082770,\n",
       "     'name': 'Zo Hartley',\n",
       "     'character': 'Orc Helper (uncredited)',\n",
       "     'order': 60},\n",
       "    {'gender': 2,\n",
       "     'id': 108,\n",
       "     'name': 'Peter Jackson',\n",
       "     'character': 'Corsair Bosun (uncredited)',\n",
       "     'order': 61},\n",
       "    {'gender': 2,\n",
       "     'id': 1674266,\n",
       "     'name': 'Sandro Kopp',\n",
       "     'character': 'Coronation Elf (uncredited)',\n",
       "     'order': 62},\n",
       "    {'gender': 2,\n",
       "     'id': 1313,\n",
       "     'name': 'Andrew Lesnie',\n",
       "     'character': 'Corsair of Umbar (uncredited)',\n",
       "     'order': 63},\n",
       "    {'gender': 2,\n",
       "     'id': 1201399,\n",
       "     'name': 'Joseph Mika-Hunt',\n",
       "     'character': 'Orc (uncredited)',\n",
       "     'order': 64},\n",
       "    {'gender': 2,\n",
       "     'id': 2082731,\n",
       "     'name': 'Henry Mortensen',\n",
       "     'character': 'Pelennor Orc (uncredited)',\n",
       "     'order': 65},\n",
       "    {'gender': 2,\n",
       "     'id': 1332,\n",
       "     'name': 'Craig Parker',\n",
       "     'character': 'Gothmog / Orc Lieutenant 1 (voice) (uncredited)',\n",
       "     'order': 66},\n",
       "    {'gender': 2,\n",
       "     'id': 1477006,\n",
       "     'name': 'Rick Porras',\n",
       "     'character': 'Corsair of Umbar / Beacon Guard (uncredited)',\n",
       "     'order': 67},\n",
       "    {'gender': 2,\n",
       "     'id': 1419579,\n",
       "     'name': 'Christian Rivers',\n",
       "     'character': 'Corsair of Umbar / Beacon Guard (uncredited)',\n",
       "     'order': 68},\n",
       "    {'gender': 2,\n",
       "     'id': 1378828,\n",
       "     'name': 'Michael Semanick',\n",
       "     'character': 'Drinking Rohan Soldier (uncredited)',\n",
       "     'order': 69},\n",
       "    {'gender': 2,\n",
       "     'id': 117,\n",
       "     'name': 'Howard Shore',\n",
       "     'character': 'Drinking Rohan Soldier (uncredited)',\n",
       "     'order': 70},\n",
       "    {'gender': 2,\n",
       "     'id': 15869,\n",
       "     'name': 'John Stephenson',\n",
       "     'character': 'Witchking (voice) (uncredited)',\n",
       "     'order': 71},\n",
       "    {'gender': 2,\n",
       "     'id': 1323,\n",
       "     'name': 'Richard Taylor',\n",
       "     'character': 'Corsair of Umbar (uncredited)',\n",
       "     'order': 72},\n",
       "    {'gender': 0,\n",
       "     'id': 1191103,\n",
       "     'name': 'Royd Tolkien',\n",
       "     'character': 'Gondorian Ranger (uncredited)',\n",
       "     'order': 73}],\n",
       "   'crew': [{'name': 'Barrie M. Osborne', 'job': 'Producer', 'id': 123},\n",
       "    {'name': 'Howard Shore', 'job': 'Original Music Composer', 'id': 117},\n",
       "    {'name': 'Christopher Boyes',\n",
       "     'job': 'Sound Re-Recording Mixer',\n",
       "     'id': 900},\n",
       "    {'name': 'Peter Jackson', 'job': 'Screenplay', 'id': 108},\n",
       "    {'name': 'Peter Jackson', 'job': 'Director', 'id': 108},\n",
       "    {'name': 'Peter Jackson', 'job': 'Producer', 'id': 108},\n",
       "    {'name': 'Bob Weinstein', 'job': 'Executive Producer', 'id': 1307},\n",
       "    {'name': 'Harvey Weinstein', 'job': 'Executive Producer', 'id': 59839},\n",
       "    {'name': 'Mark Ordesky', 'job': 'Executive Producer', 'id': 1309},\n",
       "    {'name': 'Michael Lynne', 'job': 'Executive Producer', 'id': 1311},\n",
       "    {'name': 'J.R.R. Tolkien', 'job': 'Novel', 'id': 129},\n",
       "    {'name': 'Fran Walsh', 'job': 'Screenplay', 'id': 126},\n",
       "    {'name': 'Fran Walsh', 'job': 'Producer', 'id': 126},\n",
       "    {'name': 'Philippa Boyens', 'job': 'Screenplay', 'id': 128},\n",
       "    {'name': 'Andrew Lesnie', 'job': 'Director of Photography', 'id': 1313},\n",
       "    {'name': 'Grant Major', 'job': 'Production Design', 'id': 1314},\n",
       "    {'name': 'Joe Bleakley', 'job': 'Art Direction', 'id': 1316},\n",
       "    {'name': 'Rob Outterside', 'job': 'Art Direction', 'id': 1318},\n",
       "    {'name': 'Mark Robins', 'job': 'Art Direction', 'id': 1319},\n",
       "    {'name': 'Alan Lee', 'job': 'Set Decoration', 'id': 1320},\n",
       "    {'name': 'Alan Lee', 'job': 'Conceptual Design', 'id': 1320},\n",
       "    {'name': 'John Howe', 'job': 'Conceptual Design', 'id': 1321},\n",
       "    {'name': 'Ngila Dickson', 'job': 'Costume Design', 'id': 1322},\n",
       "    {'name': 'Richard Taylor', 'job': 'Costume Design', 'id': 1323},\n",
       "    {'name': 'Victoria Burrows', 'job': 'Casting', 'id': 1324},\n",
       "    {'name': 'John Hubbard', 'job': 'Casting', 'id': 1325},\n",
       "    {'name': 'Liz Mullane', 'job': 'Casting', 'id': 1326},\n",
       "    {'name': 'Sala Baker', 'job': 'Stunts', 'id': 1366},\n",
       "    {'name': 'Dan Hennah', 'job': 'Set Decoration', 'id': 1373},\n",
       "    {'name': 'Dan Hennah', 'job': 'Supervising Art Director', 'id': 1373},\n",
       "    {'name': 'Jamie Selkirk', 'job': 'Editor', 'id': 1390},\n",
       "    {'name': 'Brent Burge', 'job': 'Sound Effects Editor', 'id': 3503},\n",
       "    {'name': 'David Farmer', 'job': 'Sound Designer', 'id': 3504},\n",
       "    {'name': 'Robert Shaye', 'job': 'Executive Producer', 'id': 13663},\n",
       "    {'name': 'Jules Cook', 'job': 'Assistant Art Director', 'id': 9420},\n",
       "    {'name': 'Jeremy Woodhead', 'job': 'Makeup Artist', 'id': 40802},\n",
       "    {'name': 'Peter Swords King', 'job': 'Makeup & Hair', 'id': 52164},\n",
       "    {'name': 'Rick Findlater', 'job': 'Makeup Artist', 'id': 52165},\n",
       "    {'name': 'Ann Robinson', 'job': 'Casting', 'id': 61624},\n",
       "    {'name': \"Casey O'Neill\", 'job': 'Stunts', 'id': 92499},\n",
       "    {'name': 'Margaret Aston', 'job': 'Makeup Artist', 'id': 75482},\n",
       "    {'name': 'Noreen Wilkie', 'job': 'Makeup Artist', 'id': 75486},\n",
       "    {'name': 'Janine Schneider', 'job': 'Makeup Artist', 'id': 117210},\n",
       "    {'name': 'Beau Borders', 'job': 'Sound Effects Editor', 'id': 579405},\n",
       "    {'name': 'Paul Lasaine',\n",
       "     'job': 'Visual Effects Art Director',\n",
       "     'id': 957354},\n",
       "    {'name': 'Amy Hubbard', 'job': 'Casting', 'id': 1016176},\n",
       "    {'name': 'Steve Dubin', 'job': 'Visual Effects Producer', 'id': 1228384},\n",
       "    {'name': 'Charlie McClellan',\n",
       "     'job': 'Visual Effects Producer',\n",
       "     'id': 1310062},\n",
       "    {'name': 'Lora Hirschberg',\n",
       "     'job': 'Additional Sound Re-Recording Mixer',\n",
       "     'id': 1327030},\n",
       "    {'name': 'Ivana Primorac', 'job': 'Makeup Artist', 'id': 1332186},\n",
       "    {'name': 'Dean Lyon', 'job': 'Visual Effects Supervisor', 'id': 1360001},\n",
       "    {'name': 'Addison Teague', 'job': 'Sound Effects Editor', 'id': 1360103},\n",
       "    {'name': 'Ethan van der Ryn',\n",
       "     'job': 'Supervising Sound Editor',\n",
       "     'id': 1378696},\n",
       "    {'name': 'Michael Semanick',\n",
       "     'job': 'Sound Re-Recording Mixer',\n",
       "     'id': 1378828},\n",
       "    {'name': 'James Whitlam', 'job': 'Visual Effects Producer', 'id': 1394036},\n",
       "    {'name': 'Tim Nielsen', 'job': 'Sound Effects Editor', 'id': 1394129},\n",
       "    {'name': 'Alex Funke', 'job': 'Visual Effects Director', 'id': 1401114},\n",
       "    {'name': 'Guy Williams', 'job': '3D Supervisor', 'id': 1401803},\n",
       "    {'name': 'Mike Hopkins', 'job': 'Supervising Sound Editor', 'id': 1404763},\n",
       "    {'name': 'Dave Whitehead', 'job': 'Sound Effects Editor', 'id': 1406066},\n",
       "    {'name': 'Michael Hedges',\n",
       "     'job': 'Sound Re-Recording Mixer',\n",
       "     'id': 1406069},\n",
       "    {'name': 'Joe Letteri', 'job': 'Visual Effects Supervisor', 'id': 1418395},\n",
       "    {'name': 'Christian Rivers',\n",
       "     'job': 'Visual Effects Designer',\n",
       "     'id': 1419579},\n",
       "    {'name': 'Hayden Collow', 'job': 'Sound Effects Editor', 'id': 1424612},\n",
       "    {'name': 'Gary Summers',\n",
       "     'job': 'Additional Sound Re-Recording Mixer',\n",
       "     'id': 1425978},\n",
       "    {'name': 'Jim Rygiel', 'job': 'Visual Effects Supervisor', 'id': 1428201},\n",
       "    {'name': 'Sean Button', 'job': 'Stunts', 'id': 1447518},\n",
       "    {'name': 'Eileen Moran', 'job': 'Visual Effects Producer', 'id': 1449177},\n",
       "    {'name': 'Randall William Cook',\n",
       "     'job': 'Animation Director',\n",
       "     'id': 1452721},\n",
       "    {'name': 'Nancy Hennah', 'job': 'Makeup Artist', 'id': 1457304},\n",
       "    {'name': 'Catherine Maguire', 'job': 'Makeup Artist', 'id': 1457308},\n",
       "    {'name': 'Rick Porras', 'job': 'Co-Producer', 'id': 1477006},\n",
       "    {'name': 'Angela Mooar', 'job': 'Makeup Artist', 'id': 1544478},\n",
       "    {'name': 'Gail Wilson', 'job': 'Makeup Artist', 'id': 1546435},\n",
       "    {'name': 'Davina Lamont', 'job': 'Makeup Artist', 'id': 1569347},\n",
       "    {'name': 'John P. Nugent',\n",
       "     'job': 'Visual Effects Supervisor',\n",
       "     'id': 1580895},\n",
       "    {'name': 'Dean Wright', 'job': 'Visual Effects Producer', 'id': 1580896},\n",
       "    {'name': 'Craig Tomlinson', 'job': 'Sound Effects Editor', 'id': 1860342},\n",
       "    {'name': 'Jacqui Allen', 'job': 'Assistant Art Director', 'id': 1929750},\n",
       "    {'name': 'Jeremy Bennett',\n",
       "     'job': 'Visual Effects Art Director',\n",
       "     'id': 1929751},\n",
       "    {'name': 'Hammond Peek', 'job': 'Production Sound Mixer', 'id': 1929766},\n",
       "    {'name': 'Vivienne MacGillicuddy', 'job': 'Makeup Artist', 'id': 1936268},\n",
       "    {'name': 'Chetan Deshmukh',\n",
       "     'job': 'Visual Effects Supervisor',\n",
       "     'id': 2006377},\n",
       "    {'name': 'Daniel Falconer', 'job': 'Sculptor', 'id': 2082714},\n",
       "    {'name': 'Kerryn Flewell-Smith', 'job': 'Makeup Artist', 'id': 2090010},\n",
       "    {'name': 'Steve Hopgood', 'job': 'Makeup Artist', 'id': 2090011},\n",
       "    {'name': 'Emma Moncrieff', 'job': 'Makeup Artist', 'id': 2090020},\n",
       "    {'name': 'Allie Rutherford', 'job': 'Makeup Artist', 'id': 2090023},\n",
       "    {'name': 'Lenore Stewart', 'job': 'Makeup Artist', 'id': 2090024},\n",
       "    {'name': 'Tera Treanor', 'job': 'Makeup Artist', 'id': 2090028},\n",
       "    {'name': 'Laurelle Ziento', 'job': 'Makeup Artist', 'id': 2090050},\n",
       "    {'name': 'Robyn Isaacs', 'job': 'Visual Effects Producer', 'id': 2090062},\n",
       "    {'name': 'Jamie Beswarick', 'job': 'Sculptor', 'id': 2152323},\n",
       "    {'name': 'Graham Binding', 'job': 'Animation', 'id': 2454671},\n",
       "    {'name': 'Bryan Ku', 'job': '3D Director', 'id': 2484069}],\n",
       "   'oscar_awards': [{'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'ART DIRECTION',\n",
       "     'name': 'Art Direction: Grant Major; Set Decoration: Dan Hennah and Alan Lee',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'COSTUME DESIGN',\n",
       "     'name': 'Ngila Dickson and Richard Taylor',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'DIRECTING',\n",
       "     'name': 'Peter Jackson',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'FILM EDITING',\n",
       "     'name': 'Jamie Selkirk',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'MAKEUP',\n",
       "     'name': 'Richard Taylor and Peter King',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'MUSIC (Original Score)',\n",
       "     'name': 'Howard Shore',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'MUSIC (Original Song)',\n",
       "     'name': 'Music and Lyric by Fran Walsh and Howard Shore and Annie Lennox',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'BEST PICTURE',\n",
       "     'name': 'Barrie M. Osborne, Peter Jackson and Fran Walsh, Producers',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'SOUND MIXING',\n",
       "     'name': 'Christopher Boyes, Michael Semanick, Michael Hedges and Hammond Peek',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'VISUAL EFFECTS',\n",
       "     'name': 'Jim Rygiel, Joe Letteri, Randall William Cook and Alex Funke',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True},\n",
       "    {'year_ceremony': 2004,\n",
       "     'ceremony': 76,\n",
       "     'category': 'WRITING (Adapted Screenplay)',\n",
       "     'name': 'Screenplay by Fran Walsh, Philippa Boyens & Peter Jackson',\n",
       "     'film': 'The Lord of the Rings: The Return of the King',\n",
       "     'winner': True}],\n",
       "   'rating': 8.477,\n",
       "   'length': 201},\n",
       "  {'title': 'The Lord of the Rings: The War of the Rohirrim',\n",
       "   'id': 839033,\n",
       "   'release_date': '2024-12-11',\n",
       "   'original_title': 'The Lord of the Rings: The War of the Rohirrim',\n",
       "   'original_language': 'en',\n",
       "   'budget': 0,\n",
       "   'revenue': 0,\n",
       "   'rating': None,\n",
       "   'genres': [{'id': 16, 'name': 'Animation'},\n",
       "    {'id': 14, 'name': 'Fantasy'},\n",
       "    {'id': 28, 'name': 'Action'}],\n",
       "   'cast': [{'name': 'Brian Cox',\n",
       "     'id': 1248,\n",
       "     'character': 'Helm Hammerhand (voice)',\n",
       "     'gender': 2,\n",
       "     'order': 0},\n",
       "    {'name': 'Miranda Otto',\n",
       "     'id': 502,\n",
       "     'character': 'Éowyn (voice)',\n",
       "     'gender': 1,\n",
       "     'order': 1},\n",
       "    {'name': 'Gaia Wise',\n",
       "     'id': 1339199,\n",
       "     'character': 'Hera Hammerhand (voice)',\n",
       "     'gender': 1,\n",
       "     'order': 2},\n",
       "    {'name': 'Luke Pasqualino',\n",
       "     'id': 220232,\n",
       "     'character': 'Wulf (voice)',\n",
       "     'gender': 2,\n",
       "     'order': 3},\n",
       "    {'name': 'Laurence Ubong Williams',\n",
       "     'id': 1674206,\n",
       "     'character': 'Fréaláf Hildeson (Voice)',\n",
       "     'gender': 2,\n",
       "     'order': 4},\n",
       "    {'name': 'Shaun Dooley',\n",
       "     'id': 85071,\n",
       "     'character': 'Freca (Voice)',\n",
       "     'gender': 2,\n",
       "     'order': 5},\n",
       "    {'name': 'Lorraine Ashbourne',\n",
       "     'id': 78329,\n",
       "     'character': '',\n",
       "     'gender': 1,\n",
       "     'order': 6},\n",
       "    {'name': 'Yazdan Qafouri',\n",
       "     'id': 3075978,\n",
       "     'character': '',\n",
       "     'gender': 2,\n",
       "     'order': 7},\n",
       "    {'name': 'Benjamin Wainwright',\n",
       "     'id': 1536980,\n",
       "     'character': '',\n",
       "     'gender': 2,\n",
       "     'order': 8},\n",
       "    {'name': 'Michael Wildman',\n",
       "     'id': 30085,\n",
       "     'character': '',\n",
       "     'gender': 2,\n",
       "     'order': 9},\n",
       "    {'name': 'Jude Akuwudike',\n",
       "     'id': 669820,\n",
       "     'character': '',\n",
       "     'gender': 2,\n",
       "     'order': 10},\n",
       "    {'name': 'Bilal Hasna',\n",
       "     'id': 3433933,\n",
       "     'character': '',\n",
       "     'gender': 2,\n",
       "     'order': 11},\n",
       "    {'name': 'Janine Duvitski',\n",
       "     'id': 90740,\n",
       "     'character': '',\n",
       "     'gender': 1,\n",
       "     'order': 12}],\n",
       "   'crew': [{'name': 'J.R.R. Tolkien', 'id': 129, 'job': 'Novel'},\n",
       "    {'name': 'Philippa Boyens', 'id': 128, 'job': 'Executive Producer'},\n",
       "    {'name': 'Philippa Boyens', 'id': 128, 'job': 'Creative Consultant'},\n",
       "    {'name': 'John Howe', 'id': 1321, 'job': 'Conceptual Illustrator'},\n",
       "    {'name': 'Richard Taylor', 'id': 1323, 'job': 'Visual Effects'},\n",
       "    {'name': 'Kenji Kamiyama', 'id': 16137, 'job': 'Director'},\n",
       "    {'name': 'Jason DeMarco', 'id': 1056783, 'job': 'Producer'},\n",
       "    {'name': 'Joseph Chou', 'id': 1070680, 'job': 'Producer'},\n",
       "    {'name': 'Steve Gallagher',\n",
       "     'id': 1457367,\n",
       "     'job': 'Original Music Composer'},\n",
       "    {'name': 'Jeffrey Addiss', 'id': 1778035, 'job': 'Writer'},\n",
       "    {'name': 'Will Matthews', 'id': 1778036, 'job': 'Writer'},\n",
       "    {'name': 'Phoebe Gittins', 'id': 2295305, 'job': 'Screenplay'},\n",
       "    {'name': 'Arty Papageorgiou', 'id': 3427109, 'job': 'Screenplay'}]},\n",
       "  {'budget': 93000000,\n",
       "   'genres': [{'id': 12, 'name': 'Adventure'},\n",
       "    {'id': 14, 'name': 'Fantasy'},\n",
       "    {'id': 28, 'name': 'Action'}],\n",
       "   'id': 120,\n",
       "   'original_language': 'en',\n",
       "   'original_title': 'The Lord of the Rings: The Fellowship of the Ring',\n",
       "   'release_date': '2001-12-18',\n",
       "   'revenue': 871368364,\n",
       "   'title': 'The Lord of the Rings: The Fellowship of the Ring',\n",
       "   'cast': [{'gender': 2,\n",
       "     'id': 109,\n",
       "     'name': 'Elijah Wood',\n",
       "     'character': 'Frodo Baggins',\n",
       "     'order': 0},\n",
       "    {'gender': 2,\n",
       "     'id': 1327,\n",
       "     'name': 'Ian McKellen',\n",
       "     'character': 'Gandalf',\n",
       "     'order': 1},\n",
       "    {'gender': 2,\n",
       "     'id': 110,\n",
       "     'name': 'Viggo Mortensen',\n",
       "     'character': 'Aragorn',\n",
       "     'order': 2},\n",
       "    {'gender': 2,\n",
       "     'id': 1328,\n",
       "     'name': 'Sean Astin',\n",
       "     'character': 'Samwise Gamgee',\n",
       "     'order': 3},\n",
       "    {'gender': 2,\n",
       "     'id': 48,\n",
       "     'name': 'Sean Bean',\n",
       "     'character': 'Boromir',\n",
       "     'order': 4},\n",
       "    {'gender': 2,\n",
       "     'id': 1329,\n",
       "     'name': 'Billy Boyd',\n",
       "     'character': 'Peregrin \"Pippin\" Took',\n",
       "     'order': 5},\n",
       "    {'gender': 2,\n",
       "     'id': 1330,\n",
       "     'name': 'Dominic Monaghan',\n",
       "     'character': 'Meriadoc \"Merry\" Brandybuck',\n",
       "     'order': 6},\n",
       "    {'gender': 2,\n",
       "     'id': 65,\n",
       "     'name': 'Ian Holm',\n",
       "     'character': 'Bilbo Baggins',\n",
       "     'order': 7},\n",
       "    {'gender': 2,\n",
       "     'id': 113,\n",
       "     'name': 'Christopher Lee',\n",
       "     'character': 'Saruman',\n",
       "     'order': 8},\n",
       "    {'gender': 1,\n",
       "     'id': 882,\n",
       "     'name': 'Liv Tyler',\n",
       "     'character': 'Arwen',\n",
       "     'order': 9},\n",
       "    {'gender': 2,\n",
       "     'id': 655,\n",
       "     'name': 'John Rhys-Davies',\n",
       "     'character': 'Gimli',\n",
       "     'order': 10},\n",
       "    {'gender': 2,\n",
       "     'id': 114,\n",
       "     'name': 'Orlando Bloom',\n",
       "     'character': 'Legolas',\n",
       "     'order': 11},\n",
       "    {'gender': 2,\n",
       "     'id': 1331,\n",
       "     'name': 'Hugo Weaving',\n",
       "     'character': 'Elrond',\n",
       "     'order': 12},\n",
       "    {'gender': 1,\n",
       "     'id': 112,\n",
       "     'name': 'Cate Blanchett',\n",
       "     'character': 'Galadriel',\n",
       "     'order': 13},\n",
       "    {'gender': 2,\n",
       "     'id': 1590835,\n",
       "     'name': 'Brent McIntyre',\n",
       "     'character': 'Witch-King',\n",
       "     'order': 14},\n",
       "    {'gender': 2,\n",
       "     'id': 1366,\n",
       "     'name': 'Sala Baker',\n",
       "     'character': 'Sauron',\n",
       "     'order': 15},\n",
       "    {'gender': 2,\n",
       "     'id': 1333,\n",
       "     'name': 'Andy Serkis',\n",
       "     'character': 'Gollum',\n",
       "     'order': 16},\n",
       "    {'gender': 2,\n",
       "     'id': 1365,\n",
       "     'name': 'Lawrence Makoare',\n",
       "     'character': 'Lurtz',\n",
       "     'order': 17},\n",
       "    {'gender': 2,\n",
       "     'id': 1332,\n",
       "     'name': 'Craig Parker',\n",
       "     'character': 'Haldir',\n",
       "     'order': 18},\n",
       "    {'gender': 2,\n",
       "     'id': 20982,\n",
       "     'name': 'Marton Csokas',\n",
       "     'character': 'Celeborn',\n",
       "     'order': 19},\n",
       "    {'gender': 2,\n",
       "     'id': 2032189,\n",
       "     'name': 'Peter McKenzie',\n",
       "     'character': 'Elendil',\n",
       "     'order': 20},\n",
       "    {'gender': 2,\n",
       "     'id': 1217771,\n",
       "     'name': 'Mark Ferguson',\n",
       "     'character': 'Gil-Galad',\n",
       "     'order': 21},\n",
       "    {'gender': 2,\n",
       "     'id': 122441,\n",
       "     'name': 'Harry Sinclair',\n",
       "     'character': 'Isildur',\n",
       "     'order': 22},\n",
       "    {'gender': 2,\n",
       "     'id': 585902,\n",
       "     'name': 'Noel Appleby',\n",
       "     'character': 'Everard Proudfoot',\n",
       "     'order': 23},\n",
       "    {'gender': 1,\n",
       "     'id': 2231244,\n",
       "     'name': 'Megan Edwards',\n",
       "     'character': 'Mrs. Proudfoot',\n",
       "     'order': 24},\n",
       "    {'gender': 1,\n",
       "     'id': 965278,\n",
       "     'name': 'Sarah McLeod',\n",
       "     'character': 'Rosie Cotton',\n",
       "     'order': 25},\n",
       "    {'gender': 2,\n",
       "     'id': 1142191,\n",
       "     'name': 'David Weatherley',\n",
       "     'character': 'Barliman Butterbur',\n",
       "     'order': 26},\n",
       "    {'gender': 2,\n",
       "     'id': 7255,\n",
       "     'name': 'Ian Mune',\n",
       "     'character': 'Bounder',\n",
       "     'order': 27},\n",
       "    {'gender': 2,\n",
       "     'id': 1590834,\n",
       "     'name': 'Michael Elsworth',\n",
       "     'character': 'Gondorian Archivist',\n",
       "     'order': 28},\n",
       "    {'gender': 2,\n",
       "     'id': 5540,\n",
       "     'name': 'Cameron Rhodes',\n",
       "     'character': 'Farmer Maggot',\n",
       "     'order': 29},\n",
       "    {'gender': 2,\n",
       "     'id': 173370,\n",
       "     'name': 'Martyn Sanderson',\n",
       "     'character': 'Gate Keeper',\n",
       "     'order': 30},\n",
       "    {'gender': 2,\n",
       "     'id': 1201351,\n",
       "     'name': 'Billy Jackson',\n",
       "     'character': 'Cute Hobbit Child',\n",
       "     'order': 31},\n",
       "    {'gender': 1,\n",
       "     'id': 2082669,\n",
       "     'name': 'Katie Jackson',\n",
       "     'character': 'Cute Hobbit Child',\n",
       "     'order': 32},\n",
       "    {'gender': 2,\n",
       "     'id': 1367,\n",
       "     'name': 'Alan Howard',\n",
       "     'character': 'The Ring (voice)',\n",
       "     'order': 33},\n",
       "    {'gender': 1,\n",
       "     'id': 1201337,\n",
       "     'name': 'Victoria Beynon-Cole',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 34},\n",
       "    {'gender': 0,\n",
       "     'id': 2082765,\n",
       "     'name': 'Paul Bryson',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 35},\n",
       "    {'gender': 0,\n",
       "     'id': 2082766,\n",
       "     'name': 'Lance Fabian Kemp',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 36},\n",
       "    {'gender': 2,\n",
       "     'id': 1511634,\n",
       "     'name': 'Phil Grieve',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 37},\n",
       "    {'gender': 0,\n",
       "     'id': 2082666,\n",
       "     'name': 'Lee Hartley',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 38},\n",
       "    {'gender': 0,\n",
       "     'id': 1201342,\n",
       "     'name': 'Jonathan Jordan',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 39},\n",
       "    {'gender': 0,\n",
       "     'id': 2082764,\n",
       "     'name': 'Semi Kuresa',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 40},\n",
       "    {'gender': 0,\n",
       "     'id': 2082762,\n",
       "     'name': 'Sam La Hood',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 41},\n",
       "    {'gender': 2,\n",
       "     'id': 2082767,\n",
       "     'name': 'Jono Manks',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 42},\n",
       "    {'gender': 2,\n",
       "     'id': 2082768,\n",
       "     'name': 'Ben Price',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 43},\n",
       "    {'gender': 0,\n",
       "     'id': 2082763,\n",
       "     'name': 'Chris Streeter',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 44},\n",
       "    {'gender': 0,\n",
       "     'id': 1361093,\n",
       "     'name': 'Clinton Ulyatt',\n",
       "     'character': 'Hero Orc / Goblin / Uruk-hai / Ringwraith',\n",
       "     'order': 45},\n",
       "    {'gender': 2,\n",
       "     'id': 108,\n",
       "     'name': 'Peter Jackson',\n",
       "     'character': 'Albert Dreary / Painting of Bungo Baggins (uncredited)',\n",
       "     'order': 46},\n",
       "    {'gender': 2,\n",
       "     'id': 2612649,\n",
       "     'name': 'Chris Ryan',\n",
       "     'character': 'Breelander (uncredited)',\n",
       "     'order': 47},\n",
       "    {'gender': 2,\n",
       "     'id': 105584,\n",
       "     'name': 'Bret McKenzie',\n",
       "     'character': 'Figwit (uncredited)',\n",
       "     'order': 48},\n",
       "    {'gender': 0,\n",
       "     'id': 2832838,\n",
       "     'name': 'Betty Adams',\n",
       "     'character': 'Hobbit (uncredited)',\n",
       "     'order': 49},\n",
       "    {'gender': 0,\n",
       "     'id': 67126,\n",
       "     'name': 'Timothy Bartlett',\n",
       "     'character': 'Hobbit (uncredited)',\n",
       "     'order': 50},\n",
       "    {'gender': 0,\n",
       "     'id': 2832843,\n",
       "     'name': 'Bob Blackwell',\n",
       "     'character': 'Hobbit (uncredited)',\n",
       "     'order': 51},\n",
       "    {'gender': 0,\n",
       "     'id': 2832859,\n",
       "     'name': 'David Houma',\n",
       "     'character': 'Hobbit (uncredited)',\n",
       "     'order': 52},\n",
       "    {'gender': 1,\n",
       "     'id': 2832881,\n",
       "     'name': 'Jo Surgison',\n",
       "     'character': 'Hobbit (uncredited)',\n",
       "     'order': 53},\n",
       "    {'gender': 0,\n",
       "     'id': 2082772,\n",
       "     'name': 'Liz Merton',\n",
       "     'character': 'Hobbit Band Member (uncredited)',\n",
       "     'order': 54},\n",
       "    {'gender': 0,\n",
       "     'id': 2082770,\n",
       "     'name': 'Zo Hartley',\n",
       "     'character': 'Kissing Hobbit (uncredited)',\n",
       "     'order': 55},\n",
       "    {'gender': 2,\n",
       "     'id': 2082753,\n",
       "     'name': 'Norman Cates',\n",
       "     'character': 'Party Hobbit (uncredited)',\n",
       "     'order': 56},\n",
       "    {'gender': 0,\n",
       "     'id': 2700505,\n",
       "     'name': 'Jeff Kingsford-Brown',\n",
       "     'character': 'Party Hobbit (uncredited)',\n",
       "     'order': 57},\n",
       "    {'gender': 0,\n",
       "     'id': 2832869,\n",
       "     'name': 'Marta Martí',\n",
       "     'character': 'Village Female Hobbit (uncredited)',\n",
       "     'order': 58},\n",
       "    {'gender': 0,\n",
       "     'id': 2082708,\n",
       "     'name': 'Riley Brophy',\n",
       "     'character': 'Cute Hobbit Child (uncredited)',\n",
       "     'order': 59},\n",
       "    {'gender': 0,\n",
       "     'id': 2295305,\n",
       "     'name': 'Phoebe Gittins',\n",
       "     'character': 'Cute Hobbit Child (uncredited)',\n",
       "     'order': 60},\n",
       "    {'gender': 0,\n",
       "     'id': 2082771,\n",
       "     'name': 'Taea Hartwell',\n",
       "     'character': 'Cute Hobbit Child (uncredited)',\n",
       "     'order': 61},\n",
       "    {'gender': 2,\n",
       "     'id': 25134,\n",
       "     'name': 'Shane Rangi',\n",
       "     'character': 'Witch-King (uncredited)',\n",
       "     'order': 62},\n",
       "    {'gender': 2,\n",
       "     'id': 173451,\n",
       "     'name': 'Jed Brophy',\n",
       "     'character': 'Ringwraith (uncredited)',\n",
       "     'order': 63},\n",
       "    {'gender': 2,\n",
       "     'id': 1440657,\n",
       "     'name': 'Paul Shapcott',\n",
       "     'character': 'Burning Ringwraith (uncredited)',\n",
       "     'order': 64},\n",
       "    {'gender': 2,\n",
       "     'id': 1320,\n",
       "     'name': 'Alan Lee',\n",
       "     'character': 'Ring King of Men (uncredited)',\n",
       "     'order': 65},\n",
       "    {'gender': 2,\n",
       "     'id': 1390005,\n",
       "     'name': 'Larry Rew',\n",
       "     'character': 'Ring King of Men (uncredited)',\n",
       "     'order': 66},\n",
       "    {'gender': 2,\n",
       "     'id': 8682,\n",
       "     'name': 'Gino Acevedo',\n",
       "     'character': 'Ring Dwarf-Lord (uncredited)',\n",
       "     'order': 67},\n",
       "    {'gender': 0,\n",
       "     'id': 2082756,\n",
       "     'name': 'Xander Forterie',\n",
       "     'character': 'Ring Dwarf-Lord (uncredited)',\n",
       "     'order': 68},\n",
       "    {'gender': 0,\n",
       "     'id': 2832872,\n",
       "     'name': 'Richard Maybery',\n",
       "     'character': 'Ring Dwarf-Lord (uncredited)',\n",
       "     'order': 69},\n",
       "    {'gender': 1,\n",
       "     'id': 1193021,\n",
       "     'name': 'Sabine Crossen',\n",
       "     'character': 'Rivendell Elf (uncredited)',\n",
       "     'order': 70},\n",
       "    {'gender': 0,\n",
       "     'id': 2082695,\n",
       "     'name': 'Gareth Jensen',\n",
       "     'character': 'Rivendell Elf (uncredited)',\n",
       "     'order': 71},\n",
       "    {'gender': 0,\n",
       "     'id': 2082679,\n",
       "     'name': 'Ben Britton',\n",
       "     'character': 'Last Alliance Elf / Rivendell Elf (uncredited)',\n",
       "     'order': 72},\n",
       "    {'gender': 0,\n",
       "     'id': 2082662,\n",
       "     'name': 'Kester Fordham',\n",
       "     'character': 'Last Alliance Elf / Rivendell Elf (uncredited)',\n",
       "     'order': 73},\n",
       "    {'gender': 0,\n",
       "     'id': 2082709,\n",
       "     'name': 'Jarl Benzon',\n",
       "     'character': 'Last Alliance Elf (uncredited)',\n",
       "     'order': 74},\n",
       "    {'gender': 2,\n",
       "     'id': 2082705,\n",
       "     'name': 'Sam Kelly',\n",
       "     'character': 'Last Alliance Elf / Council Elf  (uncredited)',\n",
       "     'order': 75},\n",
       "    {'gender': 0,\n",
       "     'id': 1424596,\n",
       "     'name': 'Matt Appleton',\n",
       "     'character': 'Council Elf (uncredited)',\n",
       "     'order': 76},\n",
       "    {'gender': 0,\n",
       "     'id': 2832876,\n",
       "     'name': 'Blair Morton',\n",
       "     'character': 'Council Elf (uncredited)',\n",
       "     'order': 77},\n",
       "    {'gender': 2,\n",
       "     'id': 2089833,\n",
       "     'name': 'Ray Henwood',\n",
       "     'character': 'Council Man (uncredited)',\n",
       "     'order': 78},\n",
       "    {'gender': 0,\n",
       "     'id': 2832861,\n",
       "     'name': 'Ralph Johnson',\n",
       "     'character': 'Council Man / Orc (uncredited)',\n",
       "     'order': 79},\n",
       "    {'gender': 2,\n",
       "     'id': 2082755,\n",
       "     'name': 'Jonathan Harding',\n",
       "     'character': 'Council Elf / Lothlorien Elf (uncredited)',\n",
       "     'order': 80},\n",
       "    {'gender': 0,\n",
       "     'id': 2082697,\n",
       "     'name': 'Jørn Benzon',\n",
       "     'character': 'Lothlorien Elf (uncredited)',\n",
       "     'order': 81},\n",
       "    {'gender': 2,\n",
       "     'id': 1439931,\n",
       "     'name': 'Ben Fransham',\n",
       "     'character': 'Lothlorien Elf / Goblin / Uruk-hai (uncredited)',\n",
       "     'order': 82},\n",
       "    {'gender': 0,\n",
       "     'id': 2537855,\n",
       "     'name': 'Tim Kano',\n",
       "     'character': 'Gondorian Citizen (uncredited)',\n",
       "     'order': 83},\n",
       "    {'gender': 0,\n",
       "     'id': 2832866,\n",
       "     'name': 'Sacha Lee',\n",
       "     'character': 'Arms of Gollum (uncredited)',\n",
       "     'order': 84},\n",
       "    {'gender': 2,\n",
       "     'id': 1383,\n",
       "     'name': 'Thomas Robins',\n",
       "     'character': 'Hand of Gollum (uncredited)',\n",
       "     'order': 85},\n",
       "    {'gender': 0,\n",
       "     'id': 1452721,\n",
       "     'name': 'Randall William Cook',\n",
       "     'character': 'Cave Troll (uncredited)',\n",
       "     'order': 86},\n",
       "    {'gender': 1,\n",
       "     'id': 582967,\n",
       "     'name': 'Rachel Clentworth',\n",
       "     'character': 'Goblin (uncredited)',\n",
       "     'order': 87},\n",
       "    {'gender': 1,\n",
       "     'id': 1802028,\n",
       "     'name': 'Lani Jackson',\n",
       "     'character': 'Goblin (uncredited)',\n",
       "     'order': 88},\n",
       "    {'gender': 0,\n",
       "     'id': 2832870,\n",
       "     'name': 'Sharon Maxwell',\n",
       "     'character': 'Goblin (uncredited)',\n",
       "     'order': 89},\n",
       "    {'gender': 2,\n",
       "     'id': 2060839,\n",
       "     'name': 'David J. Muzzerall',\n",
       "     'character': 'Goblin (uncredited)',\n",
       "     'order': 90},\n",
       "    {'gender': 2,\n",
       "     'id': 2505313,\n",
       "     'name': 'Winham Hammond',\n",
       "     'character': 'Goblin / Orc / Uruk-hai (uncredited)',\n",
       "     'order': 91},\n",
       "    {'gender': 2,\n",
       "     'id': 1774435,\n",
       "     'name': 'Mana Hira Davis',\n",
       "     'character': 'Goblin / Orc / Uruk-hai (uncredited)',\n",
       "     'order': 92},\n",
       "    {'gender': 0,\n",
       "     'id': 2832858,\n",
       "     'name': 'Warren Green',\n",
       "     'character': 'Isengard Orc Blacksmith (uncredited)',\n",
       "     'order': 93},\n",
       "    {'gender': 0,\n",
       "     'id': 2832863,\n",
       "     'name': 'Stu Johnson',\n",
       "     'character': 'Isengard Orc Blacksmith (uncredited)',\n",
       "     'order': 94},\n",
       "    {'gender': 2,\n",
       "     'id': 1771750,\n",
       "     'name': 'Peter Lyon',\n",
       "     'character': 'Isengard Orc Blacksmith (uncredited)',\n",
       "     'order': 95},\n",
       "    {'gender': 2,\n",
       "     'id': 1226770,\n",
       "     'name': 'Peter Daube',\n",
       "     'character': 'Khai (uncredited)',\n",
       "     'order': 96},\n",
       "    {'gender': 2,\n",
       "     'id': 2082732,\n",
       "     'name': 'Samuel E. Shore',\n",
       "     'character': 'Refugee / Orc (uncredited)',\n",
       "     'order': 97},\n",
       "    {'gender': 0,\n",
       "     'id': 565361,\n",
       "     'name': 'Rodney Bane',\n",
       "     'character': 'Orc (uncredited)',\n",
       "     'order': 98},\n",
       "    {'gender': 0,\n",
       "     'id': 2832839,\n",
       "     'name': 'Daniel Andrews',\n",
       "     'character': 'Orc / Uruk-hai (uncredited)',\n",
       "     'order': 99},\n",
       "    {'gender': 2,\n",
       "     'id': 1140092,\n",
       "     'name': 'Siaosi Fonua',\n",
       "     'character': 'Orc / Uruk-hai (uncredited)',\n",
       "     'order': 100},\n",
       "    {'gender': 2,\n",
       "     'id': 2832880,\n",
       "     'name': 'Ken Stratton',\n",
       "     'character': 'Isengard Orc / Last Alliance Soldier / Morgul Orc / Uruk-hai (uncredited)',\n",
       "     'order': 101},\n",
       "    {'gender': 0,\n",
       "     'id': 2832842,\n",
       "     'name': 'Lynden Berrymen',\n",
       "     'character': 'Uruk-hai at Amon Hen (uncredited)',\n",
       "     'order': 102},\n",
       "    {'gender': 0,\n",
       "     'id': 1964391,\n",
       "     'name': 'Ryan Carey',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 103},\n",
       "    {'gender': 0,\n",
       "     'id': 2832845,\n",
       "     'name': 'Tack Daniel',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 104},\n",
       "    {'gender': 2,\n",
       "     'id': 1434944,\n",
       "     'name': 'Shane Dawson',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 105},\n",
       "    {'gender': 0,\n",
       "     'id': 2832897,\n",
       "     'name': 'Branko Dordevich',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 106},\n",
       "    {'gender': 0,\n",
       "     'id': 2832865,\n",
       "     'name': 'Greg Lane',\n",
       "     'character': 'Uruk-Hai (uncredited)',\n",
       "     'order': 107},\n",
       "    {'gender': 2,\n",
       "     'id': 235025,\n",
       "     'name': 'Tim McLachlan',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 108},\n",
       "    {'gender': 2,\n",
       "     'id': 1947882,\n",
       "     'name': 'Dean Morganty',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 109},\n",
       "    {'gender': 0,\n",
       "     'id': 2832875,\n",
       "     'name': 'Greg Morrison',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 110},\n",
       "    {'gender': 2,\n",
       "     'id': 1399794,\n",
       "     'name': 'Andrew Munro',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 111},\n",
       "    {'gender': 2,\n",
       "     'id': 15296,\n",
       "     'name': 'Grant Roa',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 112},\n",
       "    {'gender': 2,\n",
       "     'id': 1828292,\n",
       "     'name': 'Vincent Roxburgh',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 113},\n",
       "    {'gender': 2,\n",
       "     'id': 2832879,\n",
       "     'name': 'Mike Stearne',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 114},\n",
       "    {'gender': 2,\n",
       "     'id': 1200415,\n",
       "     'name': 'Andrew Stehlin',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 115},\n",
       "    {'gender': 2,\n",
       "     'id': 226504,\n",
       "     'name': 'Tim Wong',\n",
       "     'character': 'Uruk-hai (uncredited)',\n",
       "     'order': 116}],\n",
       "   'crew': [{'name': 'Barrie M. Osborne', 'job': 'Producer', 'id': 123},\n",
       "    {'name': 'Howard Shore', 'job': 'Original Music Composer', 'id': 117},\n",
       "    {'name': 'Christopher Boyes',\n",
       "     'job': 'Sound Re-Recording Mixer',\n",
       "     'id': 900},\n",
       "    {'name': 'Peter Jackson', 'job': 'Screenplay', 'id': 108},\n",
       "    {'name': 'Peter Jackson', 'job': 'Director', 'id': 108},\n",
       "    {'name': 'Peter Jackson', 'job': 'Producer', 'id': 108},\n",
       "    {'name': 'Bob Weinstein', 'job': 'Executive Producer', 'id': 1307},\n",
       "    {'name': 'Harvey Weinstein', 'job': 'Executive Producer', 'id': 59839},\n",
       "    {'name': 'Mark Ordesky', 'job': 'Executive Producer', 'id': 1309},\n",
       "    {'name': 'Michael Lynne', 'job': 'Executive Producer', 'id': 1311},\n",
       "    {'name': 'J.R.R. Tolkien', 'job': 'Novel', 'id': 129},\n",
       "    {'name': 'Fran Walsh', 'job': 'Screenplay', 'id': 126},\n",
       "    {'name': 'Fran Walsh', 'job': 'Producer', 'id': 126},\n",
       "    {'name': 'Philippa Boyens', 'job': 'Screenplay', 'id': 128},\n",
       "    {'name': 'Andrew Lesnie', 'job': 'Director of Photography', 'id': 1313},\n",
       "    {'name': 'Grant Major', 'job': 'Production Design', 'id': 1314},\n",
       "    {'name': 'John Gilbert', 'job': 'Editor', 'id': 1315},\n",
       "    {'name': 'Joe Bleakley', 'job': 'Art Direction', 'id': 1316},\n",
       "    {'name': 'Philip Ivey', 'job': 'Art Direction', 'id': 1317},\n",
       "    {'name': 'Rob Outterside', 'job': 'Art Direction', 'id': 1318},\n",
       "    {'name': 'Mark Robins', 'job': 'Art Direction', 'id': 1319},\n",
       "    {'name': 'Alan Lee', 'job': 'Set Decoration', 'id': 1320},\n",
       "    {'name': 'Alan Lee', 'job': 'Conceptual Design', 'id': 1320},\n",
       "    {'name': 'John Howe', 'job': 'Conceptual Design', 'id': 1321},\n",
       "    {'name': 'Ngila Dickson', 'job': 'Costume Design', 'id': 1322},\n",
       "    {'name': 'Richard Taylor', 'job': 'Costume Design', 'id': 1323},\n",
       "    {'name': 'Richard Taylor', 'job': 'Makeup Supervisor', 'id': 1323},\n",
       "    {'name': 'Victoria Burrows', 'job': 'Casting', 'id': 1324},\n",
       "    {'name': 'John Hubbard', 'job': 'Casting', 'id': 1325},\n",
       "    {'name': 'Liz Mullane', 'job': 'Casting', 'id': 1326},\n",
       "    {'name': 'Sala Baker', 'job': 'Stunts', 'id': 1366},\n",
       "    {'name': 'Dan Hennah', 'job': 'Supervising Art Director', 'id': 1373},\n",
       "    {'name': 'Jamie Selkirk', 'job': 'Supervising Editor', 'id': 1390},\n",
       "    {'name': 'Brent Burge', 'job': 'Sound Effects Editor', 'id': 3503},\n",
       "    {'name': 'David Farmer', 'job': 'Sound Designer', 'id': 3504},\n",
       "    {'name': 'Carolynne Cunningham',\n",
       "     'job': 'First Assistant Director',\n",
       "     'id': 3506},\n",
       "    {'name': 'Robert Shaye', 'job': 'Executive Producer', 'id': 13663},\n",
       "    {'name': 'Jules Cook', 'job': 'Assistant Art Director', 'id': 9420},\n",
       "    {'name': 'Greg Powell', 'job': 'Stunt Coordinator', 'id': 10976},\n",
       "    {'name': 'Jeremy Woodhead', 'job': 'Makeup Artist', 'id': 40802},\n",
       "    {'name': 'Mark Owen Forker',\n",
       "     'job': 'Visual Effects Supervisor',\n",
       "     'id': 14924},\n",
       "    {'name': 'Tim Sanders', 'job': 'Producer', 'id': 15292},\n",
       "    {'name': 'Geoff Murphy', 'job': 'Second Unit Director', 'id': 32277},\n",
       "    {'name': 'Peter Swords King', 'job': 'Hair Designer', 'id': 52164},\n",
       "    {'name': 'Peter Swords King', 'job': 'Makeup Designer', 'id': 52164},\n",
       "    {'name': 'Rick Findlater', 'job': 'Makeup Artist', 'id': 52165},\n",
       "    {'name': 'Rick Findlater', 'job': 'Hairstylist', 'id': 52165},\n",
       "    {'name': 'Ann Robinson', 'job': 'Casting', 'id': 61624},\n",
       "    {'name': \"Casey O'Neill\", 'job': 'Stunts', 'id': 92499},\n",
       "    {'name': 'Gethin Creagh', 'job': 'Sound Re-Recording Mixer', 'id': 75301},\n",
       "    {'name': 'Margaret Aston', 'job': 'Makeup Artist', 'id': 75482},\n",
       "    {'name': 'Margaret Aston', 'job': 'Hairstylist', 'id': 75482},\n",
       "    {'name': 'Noreen Wilkie', 'job': 'Makeup Artist', 'id': 75486},\n",
       "    {'name': 'Janine Schneider', 'job': 'Makeup Artist', 'id': 117210},\n",
       "    {'name': 'Suzana Peric', 'job': 'Music Editor', 'id': 142165},\n",
       "    {'name': 'Paul Lasai
Download .txt
gitextract_bmvl_zfa/

├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── data/
│   ├── .gitattributes
│   ├── crag_task_1_and_2_dev_v4.jsonl.bz2
│   ├── crag_task_1_and_2_dev_v5.jsonl.bz2
│   ├── crag_task_3_dev_v4.tar.bz2.part1
│   ├── crag_task_3_dev_v4.tar.bz2.part2
│   ├── crag_task_3_dev_v4.tar.bz2.part3
│   ├── crag_task_3_dev_v4.tar.bz2.part4
│   ├── crag_task_3_dev_v5.tar.bz2.part0
│   ├── crag_task_3_dev_v5.tar.bz2.part1
│   ├── crag_task_3_dev_v5.tar.bz2.part2
│   └── crag_task_3_dev_v5.tar.bz2.part3
├── docs/
│   ├── baselines.md
│   ├── dataset.md
│   └── download_baseline_model_weights.md
├── example_data/
│   └── dev_data.jsonl.bz2
├── local_evaluation.py
├── mock_api/
│   ├── .gitignore
│   ├── README.md
│   ├── apiwrapper/
│   │   ├── example_call.ipynb
│   │   └── pycragapi.py
│   ├── cragapi/
│   │   ├── __init__.py
│   │   ├── fast_bm25.py
│   │   ├── finance.py
│   │   ├── movie.py
│   │   ├── music.py
│   │   ├── open.py
│   │   └── sports.py
│   ├── cragkg/
│   │   ├── .gitattributes
│   │   ├── finance/
│   │   │   └── company_name.dict
│   │   ├── movie/
│   │   │   ├── movie_db.json
│   │   │   ├── person_db.json
│   │   │   └── year_db.json
│   │   ├── music/
│   │   │   ├── artist_dict_simplified.pickle
│   │   │   ├── artist_work_dict.pickle
│   │   │   ├── grammy_df.pickle
│   │   │   ├── rank_dict_hot100.pickle
│   │   │   ├── song_dict_hot100.pickle
│   │   │   └── song_dict_simplified.pickle
│   │   ├── open/
│   │   │   ├── kg.0.jsonl.bz2
│   │   │   └── kg.1.jsonl.bz2
│   │   └── sports/
│   │       └── soccer_team_match_stats.pkl
│   ├── requirements.txt
│   └── server.py
├── models/
│   ├── README.md
│   ├── dummy_model.py
│   ├── rag_knowledge_graph_baseline.py
│   ├── rag_llama_baseline.py
│   ├── user_config.py
│   ├── utils.py
│   └── vanilla_llama_baseline.py
├── prompts/
│   └── templates.py
├── requirements.txt
├── tokenizer/
│   ├── README.md
│   ├── special_tokens_map.json
│   ├── tokenizer.json
│   ├── tokenizer.model
│   └── tokenizer_config.json
└── utils/
    └── cragapi_wrapper.py
Download .txt
SYMBOL INDEX (253 symbols across 15 files)

FILE: local_evaluation.py
  function load_json_file (line 23) | def load_json_file(file_path):
  function get_system_message (line 30) | def get_system_message():
  function attempt_api_call (line 35) | def attempt_api_call(client, model_name, messages, max_retries=10):
  function log_response (line 55) | def log_response(messages, response, output_directory="api_responses"):
  function parse_response (line 64) | def parse_response(response: str):
  function trim_predictions_to_max_token_length (line 109) | def trim_predictions_to_max_token_length(prediction):
  function load_data_in_batches (line 118) | def load_data_in_batches(dataset_path, batch_size):
  function generate_predictions (line 160) | def generate_predictions(dataset_path, participant_model):
  function evaluate_predictions (line 185) | def evaluate_predictions(queries, ground_truths_list, predictions, evalu...

FILE: mock_api/apiwrapper/pycragapi.py
  class CRAG (line 14) | class CRAG(object):
    method __init__ (line 75) | def __init__(self):
    method open_search_entity_by_name (line 78) | def open_search_entity_by_name(self, query:str):
    method open_get_entity (line 85) | def open_get_entity(self, entity:str):
    method movie_get_person_info (line 92) | def movie_get_person_info(self, person_name:str):
    method movie_get_movie_info (line 99) | def movie_get_movie_info(self, movie_name:str):
    method movie_get_year_info (line 106) | def movie_get_year_info(self, year:str):
    method movie_get_movie_info_by_id (line 113) | def movie_get_movie_info_by_id(self, movid_id:int):
    method movie_get_person_info_by_id (line 120) | def movie_get_person_info_by_id(self, person_id:int):
    method finance_get_company_name (line 127) | def finance_get_company_name(self, query:str):
    method finance_get_ticker_by_name (line 134) | def finance_get_ticker_by_name(self, query:str):
    method finance_get_price_history (line 141) | def finance_get_price_history(self, ticker_name:str):
    method finance_get_detailed_price_history (line 148) | def finance_get_detailed_price_history(self, ticker_name:str):
    method finance_get_dividends_history (line 155) | def finance_get_dividends_history(self, ticker_name:str):
    method finance_get_market_capitalization (line 162) | def finance_get_market_capitalization(self, ticker_name:str):
    method finance_get_eps (line 169) | def finance_get_eps(self, ticker_name:str):
    method finance_get_pe_ratio (line 176) | def finance_get_pe_ratio(self, ticker_name:str):
    method finance_get_info (line 183) | def finance_get_info(self, ticker_name:str):
    method music_search_artist_entity_by_name (line 190) | def music_search_artist_entity_by_name(self, artist_name:str):
    method music_search_song_entity_by_name (line 197) | def music_search_song_entity_by_name(self, song_name:str):
    method music_get_billboard_rank_date (line 204) | def music_get_billboard_rank_date(self, rank:int, date:str=None):
    method music_get_billboard_attributes (line 211) | def music_get_billboard_attributes(self, date:str, attribute:str, song...
    method music_grammy_get_best_artist_by_year (line 218) | def music_grammy_get_best_artist_by_year(self, year:int):
    method music_grammy_get_award_count_by_artist (line 225) | def music_grammy_get_award_count_by_artist(self, artist_name:str):
    method music_grammy_get_award_count_by_song (line 232) | def music_grammy_get_award_count_by_song(self, song_name:str):
    method music_grammy_get_best_song_by_year (line 239) | def music_grammy_get_best_song_by_year(self, year:int):
    method music_grammy_get_award_date_by_artist (line 246) | def music_grammy_get_award_date_by_artist(self, artist_name:str):
    method music_grammy_get_best_album_by_year (line 253) | def music_grammy_get_best_album_by_year(self, year:int):
    method music_grammy_get_all_awarded_artists (line 260) | def music_grammy_get_all_awarded_artists(self):
    method music_get_artist_birth_place (line 266) | def music_get_artist_birth_place(self, artist_name:str):
    method music_get_artist_birth_date (line 273) | def music_get_artist_birth_date(self, artist_name:str):
    method music_get_members (line 280) | def music_get_members(self, band_name:str):
    method music_get_lifespan (line 287) | def music_get_lifespan(self, artist_name:str):
    method music_get_song_author (line 294) | def music_get_song_author(self, song_name:str):
    method music_get_song_release_country (line 301) | def music_get_song_release_country(self, song_name:str):
    method music_get_song_release_date (line 308) | def music_get_song_release_date(self, song_name:str):
    method music_get_artist_all_works (line 315) | def music_get_artist_all_works(self, song_name:str):
    method sports_soccer_get_games_on_date (line 322) | def sports_soccer_get_games_on_date(self, date:str, team_name:str=None):
    method sports_nba_get_games_on_date (line 329) | def sports_nba_get_games_on_date(self, date:str, team_name:str=None):
    method sports_nba_get_play_by_play_data_by_game_ids (line 336) | def sports_nba_get_play_by_play_data_by_game_ids(self, game_ids:List[s...

FILE: mock_api/cragapi/fast_bm25.py
  class BM25 (line 35) | class BM25:
    method __init__ (line 49) | def __init__(self, corpus, k1=PARAM_K1, b=PARAM_B, alpha=IDF_CUTOFF):
    method corpus_size (line 81) | def corpus_size(self):
    method _initialize (line 84) | def _initialize(self, corpus):
    method get_top_n (line 119) | def get_top_n(self, query, documents, n=5):
    method save (line 147) | def save(self, filename):
    method load (line 152) | def load(filename):

FILE: mock_api/cragapi/finance.py
  class FinanceKG (line 23) | class FinanceKG():
    method __init__ (line 24) | def __init__(self):
    method _load_db (line 43) | def _load_db(self):
    method normalize (line 70) | def normalize(self, x:str) -> str:
    method get_company_name (line 80) | def get_company_name(self, query:str) -> list[str]:
    method get_ticker_by_name (line 99) | def get_ticker_by_name(self, company_name:str) -> str:
    method get_price_history (line 109) | def get_price_history(self, ticker_name:str):
    method get_detailed_price_history (line 134) | def get_detailed_price_history(self, ticker_name:str):
    method get_dividends_history (line 159) | def get_dividends_history(self, ticker_name:str):
    method get_market_capitalization (line 177) | def get_market_capitalization(self, ticker_name: str) -> float:
    method get_eps (line 189) | def get_eps(self, ticker_name:str) -> float:
    method get_pe_ratio (line 201) | def get_pe_ratio(self, ticker_name:str) -> float:
    method get_info (line 213) | def get_info(self, ticker_name:str):

FILE: mock_api/cragapi/movie.py
  class MovieKG (line 18) | class MovieKG:
    method __init__ (line 23) | def __init__(self, top_n: int=10) -> None:
    method _normalize (line 55) | def _normalize(self, x: str) -> str:
    method _get_ranking_db (line 66) | def _get_ranking_db(self, db: Dict[str, Any]) -> Tuple[List[str], BM25...
    method _get_direct_lookup_db (line 80) | def _get_direct_lookup_db(self, db: Dict[str, Any]) -> Dict[int, Any]:
    method _search_entity_by_name (line 95) | def _search_entity_by_name(self, query: str, bm25: BM25Okapi, corpus: ...
    method get_person_info (line 118) | def get_person_info(self, person_name: str) -> List[Dict[str, Any]]:
    method get_movie_info (line 144) | def get_movie_info(self, person_name: str) -> List[Dict[str, Any]]:
    method get_year_info (line 184) | def get_year_info(self, year: str) -> Dict[str, Any]:
    method get_movie_info_by_id (line 207) | def get_movie_info_by_id(self, movie_id: int) -> Dict[str, Any]:
    method get_person_info_by_id (line 220) | def get_person_info_by_id(self, person_id: int) -> Dict[str, Any]:

FILE: mock_api/cragapi/music.py
  class MusicKG (line 25) | class MusicKG(object):
    method __init__ (line 26) | def __init__(self):
    method normalize (line 94) | def normalize(self, x):
    method search_artist_entity_by_name (line 97) | def search_artist_entity_by_name(self, query):
    method search_song_entity_by_name (line 116) | def search_song_entity_by_name(self, query):
    method get_billboard_rank_date (line 135) | def get_billboard_rank_date(self, rank, date=None):
    method get_billboard_attributes (line 163) | def get_billboard_attributes(self, date, attribute, song_name):
    method grammy_get_best_artist_by_year (line 202) | def grammy_get_best_artist_by_year(self, year):
    method grammy_get_award_count_by_artist (line 218) | def grammy_get_award_count_by_artist(self, artist_name):
    method grammy_get_award_count_by_song (line 241) | def grammy_get_award_count_by_song(self, song_name):
    method grammy_get_best_song_by_year (line 253) | def grammy_get_best_song_by_year(self, year):
    method grammy_get_award_date_by_artist (line 269) | def grammy_get_award_date_by_artist(self, artist_name):
    method grammy_get_best_album_by_year (line 296) | def grammy_get_best_album_by_year(self, year):
    method grammy_get_all_awarded_artists (line 312) | def grammy_get_all_awarded_artists(self):
    method get_artist_birth_place (line 325) | def get_artist_birth_place(self, artist_name):
    method get_artist_birth_date (line 344) | def get_artist_birth_date(self, artist_name):
    method get_members (line 364) | def get_members(self, band_name):
    method get_lifespan (line 380) | def get_lifespan(self, artist_name):
    method get_song_author (line 399) | def get_song_author(self, song_name):
    method get_song_release_country (line 418) | def get_song_release_country(self, song_name):
    method get_song_release_date (line 437) | def get_song_release_date(self, song_name):
    method get_artist_all_works (line 456) | def get_artist_all_works(self, artist_name):

FILE: mock_api/cragapi/open.py
  class OpenKG (line 19) | class OpenKG(object):
    method __init__ (line 20) | def __init__(self):
    method normalize (line 47) | def normalize(self, x):
    method search_entity_by_name (line 50) | def search_entity_by_name(self, query):
    method get_entity (line 62) | def get_entity(self, entity):

FILE: mock_api/cragapi/sports.py
  class SoccerKG (line 20) | class SoccerKG:
    method __init__ (line 21) | def __init__(self, file_name='soccer_team_match_stats.pkl'):
    method get_games_on_date (line 33) | def get_games_on_date(self, date_str, soccer_team_name=None):
  class NBAKG (line 60) | class NBAKG:
    method __init__ (line 62) | def __init__(self):
    method get_time_cond (line 68) | def get_time_cond(self, date_str):
    method team_in_game_cond (line 83) | def team_in_game_cond(self, basketball_team_name):
    method get_games_on_date (line 89) | def get_games_on_date(self, date_str, basketball_team_name=None):
    method get_play_by_play_data_by_game_ids (line 107) | def get_play_by_play_data_by_game_ids(self, game_ids):

FILE: mock_api/server.py
  function lifespan (line 23) | async def lifespan(app: FastAPI):
  function root (line 44) | async def root():
  class QueryOpenName (line 48) | class QueryOpenName(BaseModel):
  function open_search_entity_by_name (line 68) | async def open_search_entity_by_name(query: QueryOpenName):
  class QueryOpenEntity (line 85) | class QueryOpenEntity(BaseModel):
  function open_get_entity (line 105) | async def open_get_entity(entity: QueryOpenEntity):
  class QueryMoviePerson (line 125) | class QueryMoviePerson(BaseModel):
  function movie_get_person_info (line 145) | async def movie_get_person_info(person_name: QueryMoviePerson):
  class QueryMovieMovie (line 174) | class QueryMovieMovie(BaseModel):
  function movie_get_movie_info (line 194) | async def movie_get_movie_info(person_name: QueryMovieMovie):
  class QueryMovieYear (line 237) | class QueryMovieYear(BaseModel):
  function movie_get_year_info (line 257) | async def movie_get_year_info(year: QueryMovieYear):
  class QueryMovieID (line 282) | class QueryMovieID(BaseModel):
  function movie_get_movie_info_by_id (line 302) | async def movie_get_movie_info_by_id(movie_id: QueryMovieID):
  function movie_get_person_info_by_id (line 327) | async def movie_get_person_info_by_id(person_id: QueryMovieID):
  class QueryFinanceName (line 344) | class QueryFinanceName(BaseModel):
  function finance_get_company_name (line 364) | async def finance_get_company_name(query: QueryFinanceName):
  class QueryFinanceCompanyName (line 381) | class QueryFinanceCompanyName(BaseModel):
  function finance_get_ticker_by_name (line 401) | async def finance_get_ticker_by_name(company_name: QueryFinanceCompanyNa...
  class QueryFinanceTicker (line 417) | class QueryFinanceTicker(BaseModel):
  function finance_get_price_history (line 437) | async def finance_get_price_history(ticker_name: QueryFinanceTicker):
  function finance_get_detailed_price_history (line 474) | async def finance_get_detailed_price_history(ticker_name: QueryFinanceTi...
  function finance_get_dividends_history (line 510) | async def finance_get_dividends_history(ticker_name: QueryFinanceTicker):
  function finance_get_market_capitalization (line 540) | async def finance_get_market_capitalization(ticker_name: QueryFinanceTic...
  function finance_get_eps (line 565) | async def finance_get_eps(ticker_name: QueryFinanceTicker):
  function finance_get_pe_ratio (line 590) | async def finance_get_pe_ratio(ticker_name: QueryFinanceTicker):
  function finance_get_info (line 615) | async def finance_get_info(ticker_name: QueryFinanceTicker):
  class QueryMusicArtistName (line 632) | class QueryMusicArtistName(BaseModel):
  function music_search_artist_entity_by_name (line 652) | async def music_search_artist_entity_by_name(query: QueryMusicArtistName):
  class QueryMusicSongName (line 669) | class QueryMusicSongName(BaseModel):
  function music_search_song_entity_by_name (line 689) | async def music_search_song_entity_by_name(query: QueryMusicSongName):
  class QueryMusicRank (line 705) | class QueryMusicRank(BaseModel):
  function music_get_billboard_rank_date (line 727) | async def music_get_billboard_rank_date(query: QueryMusicRank):
  class QueryMusicAttribute (line 746) | class QueryMusicAttribute(BaseModel):
  function music_get_billboard_attributes (line 770) | async def music_get_billboard_attributes(query: QueryMusicAttribute):
  class QueryMusicYear (line 789) | class QueryMusicYear(BaseModel):
  function music_grammy_get_best_artist_by_year (line 809) | async def music_grammy_get_best_artist_by_year(year: QueryMusicYear):
  class QueryMusicArtist (line 825) | class QueryMusicArtist(BaseModel):
  function music_grammy_get_award_count_by_artist (line 845) | async def music_grammy_get_award_count_by_artist(artist_name: QueryMusic...
  class QueryMusicSong (line 862) | class QueryMusicSong(BaseModel):
  function music_grammy_get_award_count_by_song (line 882) | async def music_grammy_get_award_count_by_song(song_name: QueryMusicSong):
  function music_grammy_get_best_song_by_year (line 907) | async def music_grammy_get_best_song_by_year(year: QueryMusicYear):
  function music_grammy_get_award_date_by_artist (line 932) | async def music_grammy_get_award_date_by_artist(artist_name: QueryMusicA...
  function music_grammy_get_best_album_by_year (line 957) | async def music_grammy_get_best_album_by_year(year: QueryMusicYear):
  function music_grammy_get_all_awarded_artists (line 982) | async def music_grammy_get_all_awarded_artists():
  function music_get_artist_birth_place (line 1003) | async def music_get_artist_birth_place(artist_name: QueryMusicArtist):
  function music_get_artist_birth_date (line 1028) | async def music_get_artist_birth_date(artist_name: QueryMusicArtist):
  class QueryMusicBand (line 1045) | class QueryMusicBand(BaseModel):
  function music_get_members (line 1065) | async def music_get_members(band_name: QueryMusicBand):
  function music_get_lifespan (line 1090) | async def music_get_lifespan(artist_name: QueryMusicArtist):
  function music_get_song_author (line 1115) | async def music_get_song_author(song_name: QueryMusicSong):
  function music_get_song_release_country (line 1140) | async def music_get_song_release_country(song_name: QueryMusicSong):
  function music_get_song_release_date (line 1165) | async def music_get_song_release_date(song_name: QueryMusicSong):
  function music_get_artist_all_works (line 1189) | async def music_get_artist_all_works(artist_name: QueryMusicArtist):
  class QuerySportsSoccer (line 1205) | class QuerySportsSoccer(BaseModel):
  function sports_soccer_get_games_on_date (line 1227) | async def sports_soccer_get_games_on_date(query: QuerySportsSoccer):
  class QuerySportsNBA (line 1252) | class QuerySportsNBA(BaseModel):
  function sports_nba_get_games_on_date (line 1274) | async def sports_nba_get_games_on_date(query: QuerySportsNBA):
  class QuerySportsNBAGameIds (line 1300) | class QuerySportsNBAGameIds(BaseModel):
  function sports_nba_get_play_by_play_data_by_game_ids (line 1320) | async def sports_nba_get_play_by_play_data_by_game_ids(query: QuerySport...

FILE: models/dummy_model.py
  class DummyModel (line 21) | class DummyModel:
    method __init__ (line 22) | def __init__(self):
    method get_batch_size (line 30) | def get_batch_size(self) -> int:
    method batch_generate_answer (line 42) | def batch_generate_answer(self, batch: Dict[str, Any]) -> List[str]:

FILE: models/rag_knowledge_graph_baseline.py
  class ChunkExtractor (line 104) | class ChunkExtractor:
    method _extract_chunks (line 107) | def _extract_chunks(self, interaction_id, html_source):
    method extract_chunks (line 144) | def extract_chunks(self, batch_interaction_ids, batch_search_results):
    method _flatten_chunks (line 179) | def _flatten_chunks(self, chunk_dictionary):
  function extract_json_objects (line 204) | def extract_json_objects(text, decoder=JSONDecoder()):
  class RAG_KG_Model (line 221) | class RAG_KG_Model:
    method __init__ (line 225) | def __init__(self):
    method initialize_models (line 229) | def initialize_models(self):
    method calculate_embeddings (line 265) | def calculate_embeddings(self, sentences):
    method get_batch_size (line 291) | def get_batch_size(self) -> int:
    method batch_generate_answer (line 306) | def batch_generate_answer(self, batch: Dict[str, Any]) -> List[str]:
    method format_prompts (line 400) | def format_prompts(self, queries, query_times, batch_retrieval_results...
    method extract_entity (line 453) | def extract_entity(self, batch):
    method get_kg_results (line 479) | def get_kg_results(self, entities):
    method format_prompts_for_entity_extraction (line 553) | def format_prompts_for_entity_extraction(self, queries, query_times):

FILE: models/rag_llama_baseline.py
  class ChunkExtractor (line 59) | class ChunkExtractor:
    method _extract_chunks (line 62) | def _extract_chunks(self, interaction_id, html_source):
    method extract_chunks (line 99) | def extract_chunks(self, batch_interaction_ids, batch_search_results):
    method _flatten_chunks (line 134) | def _flatten_chunks(self, chunk_dictionary):
  class RAGModel (line 159) | class RAGModel:
    method __init__ (line 163) | def __init__(self):
    method initialize_models (line 167) | def initialize_models(self):
    method calculate_embeddings (line 199) | def calculate_embeddings(self, sentences):
    method get_batch_size (line 225) | def get_batch_size(self) -> int:
    method batch_generate_answer (line 240) | def batch_generate_answer(self, batch: Dict[str, Any]) -> List[str]:
    method format_prompts (line 333) | def format_prompts(self, queries, query_times, batch_retrieval_results...

FILE: models/utils.py
  function trim_predictions_to_max_token_length (line 14) | def trim_predictions_to_max_token_length(prediction):

FILE: models/vanilla_llama_baseline.py
  class InstructModel (line 45) | class InstructModel:
    method __init__ (line 46) | def __init__(self):
    method initialize_models (line 54) | def initialize_models(self):
    method get_batch_size (line 78) | def get_batch_size(self) -> int:
    method batch_generate_answer (line 90) | def batch_generate_answer(self, batch: Dict[str, Any]) -> List[str]:
    method format_prommpts (line 144) | def format_prommpts(self, queries, query_times):

FILE: utils/cragapi_wrapper.py
  class CRAG (line 18) | class CRAG(object):
    method __init__ (line 68) | def __init__(self, server = None):
    method open_search_entity_by_name (line 74) | def open_search_entity_by_name(self, query:str):
    method open_get_entity (line 81) | def open_get_entity(self, entity:str):
    method movie_get_person_info (line 88) | def movie_get_person_info(self, person_name:str):
    method movie_get_movie_info (line 95) | def movie_get_movie_info(self, movie_name:str):
    method movie_get_year_info (line 102) | def movie_get_year_info(self, year:str):
    method movie_get_movie_info_by_id (line 109) | def movie_get_movie_info_by_id(self, movid_id:int):
    method movie_get_person_info_by_id (line 116) | def movie_get_person_info_by_id(self, person_id:int):
    method finance_get_company_name (line 123) | def finance_get_company_name(self, query:str):
    method finance_get_ticker_by_name (line 130) | def finance_get_ticker_by_name(self, query:str):
    method finance_get_price_history (line 137) | def finance_get_price_history(self, ticker_name:str):
    method finance_get_detailed_price_history (line 144) | def finance_get_detailed_price_history(self, ticker_name:str):
    method finance_get_dividends_history (line 151) | def finance_get_dividends_history(self, ticker_name:str):
    method finance_get_market_capitalization (line 158) | def finance_get_market_capitalization(self, ticker_name:str):
    method finance_get_eps (line 165) | def finance_get_eps(self, ticker_name:str):
    method finance_get_pe_ratio (line 172) | def finance_get_pe_ratio(self, ticker_name:str):
    method finance_get_info (line 179) | def finance_get_info(self, ticker_name:str):
    method music_search_artist_entity_by_name (line 186) | def music_search_artist_entity_by_name(self, artist_name:str):
    method music_search_song_entity_by_name (line 193) | def music_search_song_entity_by_name(self, song_name:str):
    method music_get_billboard_rank_date (line 200) | def music_get_billboard_rank_date(self, rank:int, date:str=None):
    method music_get_billboard_attributes (line 207) | def music_get_billboard_attributes(self, date:str, attribute:str, song...
    method music_grammy_get_best_artist_by_year (line 214) | def music_grammy_get_best_artist_by_year(self, year:int):
    method music_grammy_get_award_count_by_artist (line 221) | def music_grammy_get_award_count_by_artist(self, artist_name:str):
    method music_grammy_get_award_count_by_song (line 228) | def music_grammy_get_award_count_by_song(self, song_name:str):
    method music_grammy_get_best_song_by_year (line 235) | def music_grammy_get_best_song_by_year(self, year:int):
    method music_grammy_get_award_date_by_artist (line 242) | def music_grammy_get_award_date_by_artist(self, artist_name:str):
    method music_grammy_get_best_album_by_year (line 249) | def music_grammy_get_best_album_by_year(self, year:int):
    method music_grammy_get_all_awarded_artists (line 256) | def music_grammy_get_all_awarded_artists(self):
    method music_get_artist_birth_place (line 262) | def music_get_artist_birth_place(self, artist_name:str):
    method music_get_artist_birth_date (line 269) | def music_get_artist_birth_date(self, artist_name:str):
    method music_get_members (line 276) | def music_get_members(self, band_name:str):
    method music_get_lifespan (line 283) | def music_get_lifespan(self, artist_name:str):
    method music_get_song_author (line 290) | def music_get_song_author(self, song_name:str):
    method music_get_song_release_country (line 297) | def music_get_song_release_country(self, song_name:str):
    method music_get_song_release_date (line 304) | def music_get_song_release_date(self, song_name:str):
    method music_get_artist_all_works (line 311) | def music_get_artist_all_works(self, song_name:str):
    method sports_soccer_get_games_on_date (line 318) | def sports_soccer_get_games_on_date(self, date:str, team_name:str=None):
    method sports_nba_get_games_on_date (line 325) | def sports_nba_get_games_on_date(self, date:str, team_name:str=None):
    method sports_nba_get_play_by_play_data_by_game_ids (line 332) | def sports_nba_get_play_by_play_data_by_game_ids(self, game_ids:List[s...
Condensed preview — 63 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,591K chars).
[
  {
    "path": ".gitignore",
    "chars": 29,
    "preview": ".vscode\n__pycache__\n.DS_Store"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 251,
    "preview": "# Code of Conduct\r\n\r\nMeta has adopted a Code of Conduct that we expect project participants to adhere to.\r\nPlease read t"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 1362,
    "preview": "# Contributing to CRAG\r\nWe want to make contributing to this project as easy and transparent as\r\npossible.\r\n\r\n## Pull Re"
  },
  {
    "path": "LICENSE",
    "chars": 19749,
    "preview": "Attribution-NonCommercial 4.0 International\r\n\r\n=======================================================================\r\n"
  },
  {
    "path": "README.md",
    "chars": 3816,
    "preview": "# CRAG: Comprehensive RAG Benchmark\n\nThe Comprehensive RAG Benchmark (CRAG) is a rich and comprehensive factual question"
  },
  {
    "path": "data/.gitattributes",
    "chars": 92,
    "preview": "*.bz2 filter=lfs diff=lfs merge=lfs -text\r\n*.bz2.part* filter=lfs diff=lfs merge=lfs -text\r\n"
  },
  {
    "path": "data/crag_task_1_and_2_dev_v4.jsonl.bz2",
    "chars": 134,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:afa29f2b3facfb5d15aa9cded00d5ec90ff76f3e67279e7b99cfe86659a641ca\ns"
  },
  {
    "path": "data/crag_task_1_and_2_dev_v5.jsonl.bz2",
    "chars": 134,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:d4c14897d8ea2f450a24e098b595d8247c6575f996f9869d6f27a020fe020618\ns"
  },
  {
    "path": "data/crag_task_3_dev_v4.tar.bz2.part1",
    "chars": 135,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:3a3f642643adc427b356b34fd078ba867c3905aa4341fc181457197aee9a55cf\ns"
  },
  {
    "path": "data/crag_task_3_dev_v4.tar.bz2.part2",
    "chars": 135,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:abd76c029079b93065aba7fb4fc0e129a803de7ee0e1511432d0037d1782aa7c\ns"
  },
  {
    "path": "data/crag_task_3_dev_v4.tar.bz2.part3",
    "chars": 135,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:d82e3c94e29a361635ed6b56797747b77ef3cf07dc454736d661461f32c23dab\ns"
  },
  {
    "path": "data/crag_task_3_dev_v4.tar.bz2.part4",
    "chars": 135,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:ed48b1ca55606a7d22be4809b10d7de0251d429f01e689a066c6def2428995ad\ns"
  },
  {
    "path": "data/crag_task_3_dev_v5.tar.bz2.part0",
    "chars": 135,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:0220e4b43356ff32a00f35647a4cb375301773c7e66a48daf9329781fdfec3d7\ns"
  },
  {
    "path": "data/crag_task_3_dev_v5.tar.bz2.part1",
    "chars": 135,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:9628e5f24bb4273afbdc380c13c68533fc5e5e788e00a973a7e2765566161330\ns"
  },
  {
    "path": "data/crag_task_3_dev_v5.tar.bz2.part2",
    "chars": 135,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:533bb48a5bed3818262edd02219eff351493a2f35a276958d62b9614257471f5\ns"
  },
  {
    "path": "data/crag_task_3_dev_v5.tar.bz2.part3",
    "chars": 135,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:cc8c4b0224a3d1512283433ed6418c2a4f633dfab98f76ef4acd38fd63b26464\ns"
  },
  {
    "path": "docs/baselines.md",
    "chars": 1056,
    "preview": "# CRAG Baselines\n\nFor the CRAG benchmark, we provide users with three baseline models to help get started. Detailed impl"
  },
  {
    "path": "docs/dataset.md",
    "chars": 5792,
    "preview": "# CRAG Dataset Documentation\n\n## Overview\n\nThe CRAG dataset is designed to support the development and evaluation of Ret"
  },
  {
    "path": "docs/download_baseline_model_weights.md",
    "chars": 2295,
    "preview": "### Setting Up and Downloading Baseline Model weights with Hugging Face\n\nThis guide outlines the steps to download (and "
  },
  {
    "path": "local_evaluation.py",
    "chars": 11184,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "mock_api/.gitignore",
    "chars": 32,
    "preview": "__pycache__/\r\n.ipynb_checkpoints"
  },
  {
    "path": "mock_api/README.md",
    "chars": 1491,
    "preview": "# Comprehensive RAG Benchmark (CRAG) Mock API\n\n## Prerequisites\n\nBefore diving into the setup and usage of the CRAG Mock"
  },
  {
    "path": "mock_api/apiwrapper/example_call.ipynb",
    "chars": 1089714,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"id\": \"e5a9060c-445e-4504-8c58-dddc83d2b7b5\",\n   \""
  },
  {
    "path": "mock_api/apiwrapper/pycragapi.py",
    "chars": 18006,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\r\n# All rights reserved.\r\n\r\n# This source code is licensed under the"
  },
  {
    "path": "mock_api/cragapi/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "mock_api/cragapi/fast_bm25.py",
    "chars": 5095,
    "preview": "'''\nMIT License\n\nCopyright (c) 2021 Teo Orthlieb\n\nPermission is hereby granted, free of charge, to any person obtaining "
  },
  {
    "path": "mock_api/cragapi/finance.py",
    "chars": 8591,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "mock_api/cragapi/movie.py",
    "chars": 10315,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "mock_api/cragapi/music.py",
    "chars": 16754,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "mock_api/cragapi/open.py",
    "chars": 2121,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\r\n# All rights reserved.\r\n\r\n# This source code is licensed under the"
  },
  {
    "path": "mock_api/cragapi/sports.py",
    "chars": 5070,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "mock_api/cragkg/.gitattributes",
    "chars": 266,
    "preview": "*.pickle filter=lfs diff=lfs merge=lfs -text\r\n*.dict filter=lfs diff=lfs merge=lfs -text\r\n*.sqlite filter=lfs diff=lfs m"
  },
  {
    "path": "mock_api/cragkg/finance/company_name.dict",
    "chars": 131,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:e92fcfb64911508705b59af046cfff8b4edc38ddd6dff391c27870f2cac94ca6\ns"
  },
  {
    "path": "mock_api/cragkg/movie/movie_db.json",
    "chars": 134,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:673de2da21bd594a8acb8cdb7765346f07ccf4d4a88a74942416d1748c12964b\ns"
  },
  {
    "path": "mock_api/cragkg/movie/person_db.json",
    "chars": 133,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:85992666f528e05193cc3c97bde43e8c24a25ad59bd1a0d359df050799f79c79\ns"
  },
  {
    "path": "mock_api/cragkg/movie/year_db.json",
    "chars": 132,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:05d32ffc43e749ab6e38484b04ec6c6b0f60830f306f514309812c3cba4ed91b\ns"
  },
  {
    "path": "mock_api/cragkg/music/artist_dict_simplified.pickle",
    "chars": 134,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:7f935fc9b76b26b52843d2f52c46aaff00f1193b6e5bc9b1529d1ae9456b6a2a\ns"
  },
  {
    "path": "mock_api/cragkg/music/artist_work_dict.pickle",
    "chars": 133,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:bc6db55ab0e32e13769a2473e14050f0828eea82aef5f6e279ef6f9543a54ffc\ns"
  },
  {
    "path": "mock_api/cragkg/music/grammy_df.pickle",
    "chars": 131,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:4c6ee52e6b083a980063ee290eb0b2d6926e1478c0d696380218ca19da34f166\ns"
  },
  {
    "path": "mock_api/cragkg/music/rank_dict_hot100.pickle",
    "chars": 133,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:965cf61f1daae796d274ed90a20e724c00568eb2586339e148d97606cb608e1e\ns"
  },
  {
    "path": "mock_api/cragkg/music/song_dict_hot100.pickle",
    "chars": 132,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:a5d5943fdd69a5c7730dbc3419730559abd4ba31704cf7bc3ea48ab2e98ded4c\ns"
  },
  {
    "path": "mock_api/cragkg/music/song_dict_simplified.pickle",
    "chars": 134,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:bb8e988448b76518eb0e16ae894afa982187f972956dd12bd8e787b1a9f732f4\ns"
  },
  {
    "path": "mock_api/cragkg/open/kg.0.jsonl.bz2",
    "chars": 133,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:3c25a6533bab6d13254f627ddb2f69f60a127233ec51990c9109bf88e800ee30\ns"
  },
  {
    "path": "mock_api/cragkg/open/kg.1.jsonl.bz2",
    "chars": 133,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:a636adabb4b5af258f734bf2ad1a24a82ef84f451aaaec5e5324c4ce5753971a\ns"
  },
  {
    "path": "mock_api/cragkg/sports/soccer_team_match_stats.pkl",
    "chars": 131,
    "preview": "version https://git-lfs.github.com/spec/v1\noid sha256:86c78cb0e43f294f94d329083b4cfd31f05efed23d3ba51ed9e40dbcad656724\ns"
  },
  {
    "path": "mock_api/requirements.txt",
    "chars": 117,
    "preview": "fastapi==0.103.0\r\nuvicorn[standard]\r\npydantic==2.5.3\r\nrank_bm25\r\ntqdm\r\npandas==2.0.3\r\nlxml\r\nsqlitedict==2.1.0\r\nloguru"
  },
  {
    "path": "mock_api/server.py",
    "chars": 38414,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\r\n# All rights reserved.\r\n\r\n# This source code is licensed under the"
  },
  {
    "path": "models/README.md",
    "chars": 1198,
    "preview": "# Guide to Writing Your Own Models\n\n## Model Base Class\nYour models should follow the format from the `DummyModel` class"
  },
  {
    "path": "models/dummy_model.py",
    "chars": 3490,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "models/rag_knowledge_graph_baseline.py",
    "chars": 27139,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "models/rag_llama_baseline.py",
    "chars": 16679,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "models/user_config.py",
    "chars": 716,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "models/utils.py",
    "chars": 758,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "models/vanilla_llama_baseline.py",
    "chars": 7932,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "prompts/templates.py",
    "chars": 10645,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  },
  {
    "path": "requirements.txt",
    "chars": 156,
    "preview": "accelerate\nbeautifulsoup4\nbitsandbytes\nblingfire\nhf-transfer\nhuggingface-hub\nloguru\nlxml\nopenai==1.13.3\nsentence_transfo"
  },
  {
    "path": "tokenizer/README.md",
    "chars": 136,
    "preview": "# hf-internal-testing/llama-tokenizer\n\nThis tokenizer has been obtained from: https://huggingface.co/hf-internal-testing"
  },
  {
    "path": "tokenizer/special_tokens_map.json",
    "chars": 411,
    "preview": "{\n  \"bos_token\": {\n    \"content\": \"<s>\",\n    \"lstrip\": false,\n    \"normalized\": true,\n    \"rstrip\": false,\n    \"single_w"
  },
  {
    "path": "tokenizer/tokenizer.json",
    "chars": 1700992,
    "preview": "{\n  \"version\": \"1.0\",\n  \"truncation\": null,\n  \"padding\": null,\n  \"added_tokens\": [\n    {\n      \"id\": 0,\n      \"content\":"
  },
  {
    "path": "tokenizer/tokenizer_config.json",
    "chars": 700,
    "preview": "{\n  \"add_bos_token\": true,\n  \"add_eos_token\": false,\n  \"bos_token\": {\n    \"__type\": \"AddedToken\",\n    \"content\": \"<s>\",\n"
  },
  {
    "path": "utils/cragapi_wrapper.py",
    "chars": 16817,
    "preview": "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n\n# This source code is licensed under the li"
  }
]

// ... and 2 more files (download for full content)

About this extraction

This page contains the full source code of the facebookresearch/CRAG GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 63 files (2.9 MB), approximately 761.1k tokens, and a symbol index with 253 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!