Spaces:
Sleeping
Sleeping
Create agent_doc.md
Browse files- agent_doc.md +86 -0
agent_doc.md
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Prolog Knowledge Base for SSI Eligibility
|
2 |
+
|
3 |
+
This document describes the Prolog knowledge base representing rules and facts about Supplemental Security Income (SSI) eligibility, particularly focusing on the eligibility criteria for non-citizens.
|
4 |
+
|
5 |
+
## Entity Types
|
6 |
+
|
7 |
+
The knowledge base defines several entity types:
|
8 |
+
|
9 |
+
* **program**: Government programs, like 'SSI'.
|
10 |
+
* **law**: Legal acts, such as 'PRWORA', 'INA', 'NACARA'.
|
11 |
+
* **alien_category**: Categories of non-citizens, like 'Qualified_Alien', 'Nonqualified_Alien'.
|
12 |
+
* **ethnicity**: Ethnicities, such as 'American_Indian', 'Amerasian_Immigrant'.
|
13 |
+
* **organization**: Organizations like 'Federally_Recognized_Indian_Tribe', 'U.S._Armed_Forces'.
|
14 |
+
* **status**: Immigration statuses like 'Refugee', 'Asylee', 'Parolee'.
|
15 |
+
* **condition**: Medical conditions like 'Blind', 'Disabled'.
|
16 |
+
* **time_period**: Specific periods, like '7_Years'.
|
17 |
+
|
18 |
+
## Facts and Rules
|
19 |
+
|
20 |
+
The knowledge base contains facts and rules related to SSI eligibility:
|
21 |
+
|
22 |
+
**Eligibility Requirements**:
|
23 |
+
|
24 |
+
* `eligibility_requirement('SSI', 'Qualified_Alien')`: A 'Qualified_Alien' meets a core requirement for SSI.
|
25 |
+
* `eligibility_requirement('SSI', 'Exception_Condition')`: Specific exceptions based on conditions exist for SSI.
|
26 |
+
|
27 |
+
**Law Applicability**:
|
28 |
+
|
29 |
+
* `applies_to('PRWORA', 'SSI', 'Alien_Applicants')`: The Personal Responsibility and Work Opportunity Reconciliation Act (PRWORA) applies to 'Alien_Applicants' for 'SSI'.
|
30 |
+
* Similar `applies_to` facts define the applicability of other laws to specific statuses.
|
31 |
+
|
32 |
+
**General SSI Eligibility**:
|
33 |
+
|
34 |
+
* `eligible_for_ssi(Person)`: This rule defines various ways a `Person` can be eligible for SSI:
|
35 |
+
* Being a US citizen or national.
|
36 |
+
* Qualifying through the American Indian exception.
|
37 |
+
* Being a grandfathered SSI recipient.
|
38 |
+
* Being a qualified alien who meets further criteria.
|
39 |
+
|
40 |
+
**Specific Eligibility Rules**:
|
41 |
+
|
42 |
+
* Rules like `american_indian_exception(Person)`, `grandfathered_ssi_recipient(Person)`, and `qualified_alien_eligible(Person)` detail the specific requirements for each eligibility category.
|
43 |
+
|
44 |
+
* Further rules define eligibility based on specific statuses like 'Refugee', 'Asylee', 'Deportation_Withheld', etc. These rules often check for conditions like being blind or disabled in 1996, lawfully residing and receiving SSI in 1996, having military connections, or meeting the 7-year rule.
|
45 |
+
|
46 |
+
**Helper Predicates**:
|
47 |
+
|
48 |
+
The knowledge base relies on several helper predicates (not fully defined within this knowledge base) to determine eligibility. These predicates cover aspects like:
|
49 |
+
|
50 |
+
* `us_citizen(Person)`: Checks if a `Person` is a US citizen.
|
51 |
+
* `lawfully_residing(Person, 'U.S.', Date)`: Checks if a `Person` was lawfully residing in the 'U.S.' on a specific `Date`.
|
52 |
+
* `has_40_qualifying_quarters(Person)`: Checks if a `Person` has accumulated 40 qualifying quarters of work.
|
53 |
+
* And many others related to military connections, specific dates, status durations, etc.
|
54 |
+
|
55 |
+
## Usage
|
56 |
+
|
57 |
+
This Prolog knowledge base can be used to:
|
58 |
+
|
59 |
+
* Determine the SSI eligibility of individuals based on their citizenship, immigration status, and other relevant factors.
|
60 |
+
* Identify the legal grounds for eligibility or ineligibility.
|
61 |
+
* Answer queries about the relationship between different laws, statuses, and eligibility criteria.
|
62 |
+
|
63 |
+
## Example Queries
|
64 |
+
|
65 |
+
* **Is a person with refugee status granted within the last 5 years eligible for SSI?**
|
66 |
+
* code
|
67 |
+
```prolog
|
68 |
+
status(person1, 'Refugee').
|
69 |
+
status_granted_within_7_years(person1, 'Refugee').
|
70 |
+
```
|
71 |
+
* query
|
72 |
+
```prolog
|
73 |
+
eligible_for_ssi(person1).
|
74 |
+
```
|
75 |
+
* **Is a person who has been a parolee for 2 years eligible for SSI?**
|
76 |
+
* code
|
77 |
+
```prolog
|
78 |
+
status(person2, 'Parolee').
|
79 |
+
parolee_for_at_least_1_year(person2).
|
80 |
+
```
|
81 |
+
* query
|
82 |
+
```prolog
|
83 |
+
eligible_for_ssi(person2).
|
84 |
+
```
|
85 |
+
|
86 |
+
This knowledge base provides a foundation for reasoning about SSI eligibility, particularly for non-citizens. By defining specific facts and rules, it enables users to query and understand the complex interplay of factors that determine eligibility under US law.
|