Please find a copy of the assessment in this folder, along with all relevant input files (userintent.txt, client.json, organisation.json, and the template .docx). The exercise is to provide a .docx output that is client-presentable.
REST API that processes user intent from a .txt file, integrates it with data from JSON files, and outputs a formatted .docx document using the provided template.
- Java 17
- Apache POI
- Spring Boot
- Claude API key (optional for LLM-based processing)
userintent.txt: Contains the user's intent to be processed.client.json: Represents information about a client.organisation.json: Represents information about the organisation and possible outcomes.- Template
.docx: A Word document template where the processed user intent will be inserted.
- Parse the
userintent.txtfile to extract the user's intent. - Parse
client.jsonandorganisation.jsoninto objects. - Process the user intent and map it to the client and organisation details.
- Optionally use the LLM service to refine or transform the text.
- Insert the processed text into the relevant section of the provided
.docxtemplate. - Save the output as a new
.docxfile.
Feel free to use your own equivalent JSONS or intent .txt files if of equivalent complexity should you find this preferable.
POST /api/user-request Body: multipart/form-data
userIntent (file): The .txt file containing user intent. template (file): The .docx template file.
-
Input 1:
userintent.txt: "I want to transfer my pension from Aviva to Fidelity."- Output: a
.docxletter recommending a pension transfer from Aviva to Fidelity. It must contain details from the both the Aviva and Fidelity plans.
-
Input 2:
userintent.txt: "I would like to consolidate my pensions into one provider."- Output: a
.docxletter detailing a consolidation of pensions.
If you have any questions, please email: