@@ -66,21 +66,115 @@ curl https://lattes-navigator-api-production.up.railway.app/debug
6666
6767### POST /analyze
6868
69- Analyze researchers for COI.
69+ Analyze researchers for COI (pairwise analysis) .
7070
7171``` bash
7272curl -X POST https://lattes-navigator-api-production.up.railway.app/analyze \
7373 -H " Content-Type: application/json" \
7474 -d ' {
75- "reviewers ": [
76- {"name": "Ricardo Marcacini", "lattes_id": "4003190744770195", "phd": "false "},
77- {"name": "Matheus", "lattes_id": "1458324546544936", "phd": "false "}
75+ "researchers ": [
76+ {"name": "Ricardo Marcacini", "lattes_id": "3272611282260295 "},
77+ {"name": "Matheus Yasuo ", "lattes_id": "6191612710855387 "}
7878 ],
7979 "time_window": 5,
8080 "coi_rules": {"R1": true, "R2": true, "R3": true, "R4": true, "R5": true, "R6": true, "R7": true}
8181 }'
8282```
8383
84+ ### POST /validate-committee
85+
86+ Validate academic committee for conflicts of interest. Analyzes COI only between student and non-advisor committee members.
87+
88+ ** Request Body:**
89+ ``` json
90+ {
91+ "student" : {
92+ "name" : " Matheus Yasuo Ribeiro Utino" ,
93+ "lattes_id" : " 6191612710855387"
94+ },
95+ "advisor" : {
96+ "name" : " Ricardo Marcondes Marcacini" ,
97+ "lattes_id" : " 3272611282260295"
98+ },
99+ "committee_members" : [
100+ {
101+ "name" : " Solange Oliveira Rezende" ,
102+ "lattes_id" : " 8526960535874806" ,
103+ "email" : " solange@icmc.usp.br" ,
104+ "institution" : " ICMC-USP" ,
105+ "role" : " internal" ,
106+ "is_president" : false
107+ },
108+ {
109+ "name" : " Paulo Roberto Mann Marques Júnior" ,
110+ "lattes_id" : " 3571577377652346" ,
111+ "email" : " paulomann@ufrj.br" ,
112+ "institution" : " UFRJ" ,
113+ "role" : " external" ,
114+ "is_president" : false
115+ }
116+ ],
117+ "thesis_title" : " Unstructured Text Mining in the Era of Large Language Models" ,
118+ "committee_type" : " qualification" ,
119+ "time_window" : 5
120+ }
121+ ```
122+
123+ ** Test Valid Committee:**
124+ ``` bash
125+ curl -X POST https://lattes-navigator-api-production.up.railway.app/validate-committee \
126+ -H " Content-Type: application/json" \
127+ -d @tools/cnpq_lattes_navigator/examples/valid_committee.json
128+ ```
129+
130+ ** Test Invalid Committee (with COI):**
131+ ``` bash
132+ curl -X POST https://lattes-navigator-api-production.up.railway.app/validate-committee \
133+ -H " Content-Type: application/json" \
134+ -d @tools/cnpq_lattes_navigator/examples/invalid_committee.json
135+ ```
136+
137+ ** Response (Valid Committee):**
138+ ``` json
139+ {
140+ "status" : " valid" ,
141+ "student" : {... },
142+ "advisor" : {... },
143+ "members_analysis" : [
144+ {
145+ "member" : {... },
146+ "coi_detected" : false ,
147+ "coi_details" : []
148+ }
149+ ],
150+ "conflicts" : [],
151+ "collection_log" : [
152+ " Extracting 1/5: Matheus Yasuo Ribeiro Utino (student)" ,
153+ " Extracting 2/5: Ricardo Marcondes Marcacini (advisor)" ,
154+ ...
155+ ],
156+ "summary" : " Committee valid. Analyzed 4 members against student. No conflicts detected."
157+ }
158+ ```
159+
160+ ** Response (Invalid Committee):**
161+ ``` json
162+ {
163+ "status" : " invalid" ,
164+ "conflicts" : [
165+ {
166+ "student_name" : " Matheus Yasuo Ribeiro Utino" ,
167+ "member_name" : " Paulo Roberto Mann Marques Júnior" ,
168+ "member_role" : " external" ,
169+ "rules_triggered" : [" R1" ],
170+ "confidence" : " high" ,
171+ "evidence" : [" Shared: Paper Title (2024)" ]
172+ }
173+ ],
174+ "summary" : " Committee INVALID. 1 conflict(s) detected with: Paulo Roberto Mann Marques Júnior."
175+ }
176+ ```
177+
84178## Test Procedures
85179
86180### 1. Verify Deployment
@@ -117,6 +211,26 @@ curl -X POST https://lattes-navigator-api-production.up.railway.app/analyze \
117211 -d ' {"researchers": [{"name": "Researcher A", "lattes_id": "ID_A"}, {"name": "Researcher B", "lattes_id": "ID_B"}], "time_window": 5}'
118212```
119213
214+ ### 5. Committee Validation Test
215+
216+ ** Test Valid Committee (no conflicts expected):**
217+ ``` bash
218+ curl -X POST https://lattes-navigator-api-production.up.railway.app/validate-committee \
219+ -H " Content-Type: application/json" \
220+ -d @tools/cnpq_lattes_navigator/examples/valid_committee.json
221+ ```
222+
223+ ** Test Invalid Committee (conflict expected with Paulo Mann):**
224+ ``` bash
225+ curl -X POST https://lattes-navigator-api-production.up.railway.app/validate-committee \
226+ -H " Content-Type: application/json" \
227+ -d @tools/cnpq_lattes_navigator/examples/invalid_committee.json
228+ ```
229+
230+ ** Expected Results:**
231+ - Valid committee: ` "status": "valid" ` , ` "conflicts": [] `
232+ - Invalid committee: ` "status": "invalid" ` , conflicts with Paulo Roberto Mann Marques Júnior
233+
120234## COI Rules
121235
122236| Rule | Description |
0 commit comments