Grouper Training - AI - Lesson: Trained model
Getting started
Lesson
Make a fine tuned trained model
Go to ChatGPT (base model 5.1) and enter this prompt
Make 10 jsonl openAI fine tuning model training JSON based on this Example question (dont use this one) Question: abac script for staff in the art museum org Answer: entity.hasRow('hr_positions', "role == 'staff' && org_code == 'AMU' ") Example question (dont use this one) Question: fac or staff from alumni relations Answer: entity.hasRow('hr_positions', " ( role == 'faculty' || role == 'staff' ) && dept_code == 'ALMR' ") These would be two lines of the JSONL file but come up with ten more not including these {"messages":[{"role":"user","content":"abac script for staff in the art museum org"},{"role":"assistant","content":"entity.hasRow('hr_positions', \"role == 'staff' && org_code == 'AMU' \")"}]} {"messages":[{"role":"user","content":"fac or staff from alumni relations"},{"role":"assistant","content":"entity.hasRow('hr_positions', \" ( role == 'faculty' || role == 'staff' ) && dept_code == 'ALMR' \")"}]} Do not hallucinate more rows or attributes, if you do not know the answer, tell the user it is not possible or to read the Entity Data Field Data Dictionary: https://localhost:8443/grouper/grouperUi/app/UiV2Main.index?operation=UiV2EntityDataFields.viewDataFieldAndRowDictionary When checking equality of an attribute always use == and never use = Do not have scripts that are too long. You can have a line break before an && or an || for example. The possible attributes for hr_positions are: role, dept_code, org_code These are the role values (must be one of these): faculty, staff, work_study, affiliate. work_study means a student with a work study job. These are the departments (dept_code: description): AAAS: African and African American Studies ALMR: Alumni Relations AMAT: Applied Mathematics AMUS: Art Museum ANTH: Anthropology APCS: Applied Computation APHY: Applied Physics ARCH: Architecture, Landscape Arch, and Urban Planning ART: Art These are the orgs (org_code: description): AMU: Art Museum AS: College of Arts and Sciences BT: Board of Trustees CIS: Centers & Institutes CSTU: School of Continuing Studies Comm: Communications DEIS: Diversity Equity & Inclusion FA: Finance & Administration GC: General CounselIf it doesnt prompt you to download a file, enter this prompt
give me a valid JSONL file to download preferably named: gteAiAbacTraining.jsonlMake a
Go to openai playground
Click on "fine tuning"
Create
Supervised
Base model 4.1 nano
Suffix:
gte-ai-abacUpload the jsonl file above
Create
Look at billing and see where you are at. Click on "Usage"
Edit the assistant to use the trained model
Assistants → Assistant → Model → Pick the gte-ai-abac on at bottom
Try out the abac prompt again
Create a group in your GTE (https://localhost:8443/grouper): testAbacAi2 in the test folder
Group actions → Loader
Loader actions → Edit loader configuration
Yes has loader
Source type: Scripted group
Construct script: Pattern
Pattern: GTE ABAC AI
Prompt:
include faculty in political science department. also include staff in the org for general counselAnalyze resulting script (e.g.)
entity.hasRow('hr_positions', "role == 'faculty' && dept_code == 'POLI'") || entity.hasRow('hr_positions', "role == 'staff' && org_code == 'GC'")Should have 14 people (wait a minute for incremental ABAC JEXL daemon to run)
Check usage, see how much that cost (https://platform.openai.com/settings → Billing)