FulFILL your desires of getting AI write repetitive studies for you. Learn the way we constructed Fill.sg in 2 weeks at LAUNCH!
Desk of Contents
- Introduction
- Problem statement
- Our Solution
- Prompts Behind Fill.sg
∘ Breakthrough in LLMs: Long-context models
∘ Our Prompting Approach
∘ Report Generation: Divide and Conquer - UI/UX Considerations for a User-Friendly GenAI Tool
∘ Building an inclusive AI tool
∘ Bespoke Interface for Editing and Reviewing - Post-Hackathon: Potential for Future Development
- Conclusion
- How to be a part of LAUNCH!
- Acknowledgments
We’re a group from the Ministry of Social and Household Improvement (MSF) and GovTech’s Information Science and AI Division. United by the reason for the issue assertion to make report writing simpler and fewer time consuming, we teamed as much as construct Fill.sg from ideation to prototyping. Inside simply two weeks, we performed person discovery, constructed a prototype, and gathered preliminary person suggestions to find out the feasibility of the answer. This text shares our journey by means of the primary LAUNCH! Hackathon Dash in April 2024 and our strategy to creating the answer.
Background
When ChatGPT first debuted, it opened our eyes to the potential of an clever chatbot, far past something we had seen earlier than. This breakthrough sparked our imaginations, inspiring us to discover options to resolve issues that steadily expanded from recipe creations to powerful enterprise use instances throughout totally different domains and their enterprise capabilities.
Equally, there’s a robust want from businesses within the Singapore Authorities to leverage AI to raised serve residents and public servants. We now have seen over 400 numerous concepts contributed in a brief span of 12 months. These concepts stem from long-established ache factors, and AI has opened potentialities to resolve them. These ache factors have been numerous with their very own distinctive challenges. At GovTech, we do our greatest to take a stab at as many drawback statements throughout the periphery as attainable — utilizing the idea of ‘drawback house’.
Why did we select to sort out the issue house of report writing?
One key drawback house that caught our consideration was how we might assist officers to draft studies in a extra environment friendly method. Writing studies is an integral a part of our roles as public service officers — from easier ones like assembly minutes to extra advanced ones like financial studies and court docket studies. Whereas our intention was to not use AI to switch decision-making duties requiring skilled judgement and evaluation, we noticed potential in leveraging AI to synthesise and organise info for report writing. Complicated studies can take hours, perhaps days, and require synthesising myriads of data from numerous sources together with graphs, texts, excel spreadsheets, and many others. The identical report kind is often written a number of occasions with the identical format for various instances, which might begin to get mundane in a short time. Actually, a templating software that may assist draft even 50% of repetitive studies can be a considerable time saver for public officers, liberating up their time by permitting them to vet and amend studies to make sure accuracy fairly than drafting them from scratch, so they might give attention to extra vital duties.
Nonetheless, it is a troublesome and sophisticated drawback house — particularly, how will we summary the strategies to absorb sources of data with numerous lengths, instruct Massive Language Fashions (LLMs) to extract the essential particulars, and generate related outputs? Every step is essential to provide a top quality report grounded with the suitable context.
With this in thoughts, we began our two-week journey of creating report writing much less onerous. Our aim was to alleviate officers from time-consuming administrative duties, in order that they might give attention to partaking and offering assist to residents.
Introducing Fill.sg and What It Presents
Fill.sg is an internet software that helps you fulFILL your desires of creating report writing easier, simpler, and quicker by having AI generate studies for you, so you may give attention to extra vital duties.
Enterprise Person Move
Fill.sg gives an interface for enterprise customers to curate Modular and Versatile Templates for Era of Structured Experiences. In gist, customers can choose a beforehand outlined Template, add a number of unstructured or structured textual content paperwork as Context for the report, and voila, a full report may be generated with out touching the keyboard. The report may even be exported to Microsoft Phrase with the formatting of headings and tables intact.
A single Template created in Fill.sg may be reused to generate a number of studies with the identical construction. As an illustration, a Firm Report Template may be reused for producing studies about Firm A, B, C, and so forth utilizing totally different Context offered.
Within the demonstration above, the person is ready to add paperwork and use these paperwork as Context to generate a report. The AI behind the scenes will take these Context paperwork and use them to generate a bespoke report based mostly on the Template. As soon as generated, customers can obtain it as a Phrase doc (.docx), which preserves the headings and desk formatting.
Tremendous Person Move
Tremendous customers are customers with each the technical and area data required to grasp how you can immediate the LLM accurately to fill in every part of the report Template. These tremendous customers play a vital function for the success of the software, as they’ve sufficient area data, and technical experience on immediate engineering to instruct LLM in filling every part of the report Template.
Tremendous customers can go into edit mode, the place they will edit the construction of Templates and add new technology blocks. Every technology block is meant to fill up a selected part of a report. As soon as a Template is created and saved, enterprise customers will be capable of use the curated template to generate a number of studies of the identical construction.
Within the above demo, the tremendous person first uploads a set of instance Context paperwork, that are used for previewing the template technology. They then go to the editor panel to edit the Template. For every new part of the report, the person provides a brand new technology block, the place they’re able to configure the technology settings and instruct the template on what ought to be generated for the part. As soon as the technology settings are saved, the LLM generates a pattern consequence based mostly on the instance Context paperwork, and the tremendous person is ready to confirm the preview of the technology. As soon as the tremendous person is glad with the template, they will then reserve it and make it obtainable for enterprise customers to make use of.
Having easy, modular, and editable templates permits company customers to be self-reliant when utilizing the software, as they will create and modify templates to adapt to ever-changing enterprise wants.
Breakthrough in LLMs: Lengthy-context fashions
Up to now few months, the context window dimension of main LLMs has been quickly rising. For instance, OpenAI’s GPT-4-Turbo has a context window of 128,000 tokens, which is roughly 400% of its predecessor, GPT-4–32k. The time period ‘context window’ refers back to the variety of tokens that the LLM can contemplate when producing a response.
Having an extended context window, due to this fact, means extra info may be offered to the LLM through the immediate and is commonly indicative of the semantic functionality of the LLM in managing extra tokens.
This functionality solves a few of the teething challenges of an RAG workflow. As an alternative of optimising chunking, search, and retrieval methods, we will use in-context prompting and instruct the LLM to take reference from related sources accordingly. For instance, we might feed your complete enter doc(s) to the LLM, instruct it to give attention to particular sections, and supply an output (whether or not it’s in bullet factors, a paragraph, or a desk) based mostly on the context that we had given an instruction to.
Our Prompting Method
For this use case, we leverage this in our resolution by feeding extra related info, together with whole paperwork, within the immediate. In our experimentations, this technique has proven to be efficient, based mostly on the idea that the enter doc(s) are related to every report.
All through the two weeks, we took an iterative immediate engineering strategy to put in writing, consider, and refine prompts:
- Write the preliminary immediate making use of system, person, and/or assistant roles when outlining the duty definition and context wanted to function a place to begin.
- Consider the LLM’s responses towards anticipated outputs utilizing constant success standards, whether or not by means of human analysis or self-evaluation like within the LLM-as-a-Judge approach.
- Based mostly on the analysis outcomes, refine the immediate to enhance the efficiency akin to by including clarifications or constraints in steering the LLM’s responses
Our essential success standards in analysis is the flexibility to generalise throughout numerous report sections and codecs, as a way to permit the technology of paragraphs, tables, bullet factors, and even constrained selections to satisfy the wants of a typical report.
The prompts that we’ve got crafted function the bottom to summary away the challenges in immediate engineering and permit for domain-specific inputs from our end-users. This implies customers of Fill.sg merely give attention to offering domain-specific info such because the title and outline of a selected report part as a substitute of worrying concerning the nitty-gritty of immediate engineering.
Report Era: Divide and Conquer
Issues with Single Immediate Era
For anybody who has tried to generate a full report utilizing a single immediate with an LLM, you’ll know that it often doesn’t end up too effectively; outputs are usually brief, and hallucinations begin to pop up after the third paragraph, and the later sections the place you explicitly required tables are as a substitute populated by partitions of textual content.
This occurs as a result of LLMs usually usually are not skilled for producing extraordinarily lengthy studies requiring a number of codecs, i.e., tables, texts, or bullet factors inside a single response. We now have seen LLMs carry out higher when requested to carry out one activity and one kind of output at a time, not a number of duties directly and positively not totally different codecs throughout the similar output.
Smaller however Many Modular Prompts may be Advantageous
In software program engineering, it’s good observe to decompose advanced programs into modular parts. We discovered this precept to be equally efficient when utilized to duties given to a LLM.
To ameliorate the problems with instructing the LLM to generate a full report inside a single immediate, we studied carefully how studies are written to see how we will decompose this advanced activity. We noticed a pattern — most traditional studies are inclined to have sections the place every part describes a selected matter and often consists of a single format. This can be utilized to our benefit as we will break down the advanced activity of writing a full report into particular person, smaller duties — to put in writing particular sections with particular output expectations.
Process decomposition through a section-level technology can assist the mannequin produce higher outputs as every part may be assigned as single duties, and localised context may be injected into the immediate for every part to offer clearer directions for the LLM to raised perceive its targets. Moreover, we will specify anticipated sorts for every generated part, which permits us to steer the technology and validate output codecs extra successfully.
In addition to the advantages of structured modular prompts in producing greater high quality content material, the ability of modular prompting additionally lies in permitting straightforward writing, modification and debugging. Not solely does modular prompting assist to supply clearer and higher directions to the LLM, it additionally helps builders within the iterative growth of prompts.
Generations Blocks and Era Varieties
In our software, we time period these sections the place every technology activity happens as Era Blocks. These Era Blocks are set with a selected technology kind in order that we will implement sure constraints on the outputs generated by the mannequin.
In our case, we settled on a number of technology sorts to implement for the hackathon:
- Lengthy Textual content Era: Lengthy paragraphs of textual content
- Desk Era: Outputs in tabular codecs with columns specified by settings
- Bullet Factors Era: Output generated in Bullet Level kind
- Choice Era: Outputs probably the most appropriate worth chosen from a pre-set listing of values outlined by the person
The next are demos for every Era Sort. As seen under, the app permits customers to edit contents simply with pre-configured settings based mostly on the necessities of the report.
Lengthy Textual content Era
Desk Era
Bullet Factors Era
Choice Era
Constructing an inclusive AI software
One of the vital classes occurred throughout our first person interview. We acquired good suggestions from the tremendous customers who have been in a position to observe by means of with our preliminary proposed circulate of customising templates in a short time. As we introduced the concepts, they have been additionally developing with new concepts on how you can enhance the software. Nonetheless, we observed that enterprise customers would a lot choose to get their jobs of churning out studies performed simply, with out the necessity to customise any templates.
This taught us that despite the fact that know-how could also be highly effective sufficient to resolve the issue, we have to design a software for customers with totally different backgrounds and technical affinity to AI. So, we iterated Fill.sg and constructed it with 2 personas in thoughts — Tremendous Customers and Enterprise Customers.
Bespoke Interface for Modifying and Reviewing
The aim of Fill.sg is to cut back the time wanted to put in writing studies whereas balancing the necessity to make sure the accountability of customers in utilizing any content material created. So, we wish to retain the mechanisms for customers to have management throughout the workflow. Customers want to make sure the AI-generated content material is dutifully reviewed and checked for errors. Therefore, with AI security in thoughts, we made the enhancing and reviewing expertise as easy as attainable. We furnished the applying with a correct WYSIWYG editor, Tiptap, to supply a bespoke Graphical Person Interface to work together with the AI in a extra human-friendly approach.
With the present obtainable instruments, customers will sometimes use a chat interface for report writing. There are a number of ache factors from this expertise:
- The sequential format makes it laborious to immediate the LLM in parallel, that means customers have to attend for an output earlier than sending the subsequent question.
- A substantial amount of copy-pasting is required between the chat interface and the precise doc.
- Customers are unable to reuse earlier chats to generate the identical structured studies.
Utilizing an editor interface fairly than a linear chat interface is helpful because it solves all of the aforementioned issues of the usual technique.
- Having a side-by-side Editor and Preview panel permits customers to constantly edit the templates whereas the LLM generates the preview in parallel within the background. This implies customers don’t want to attend for the LLM technology to proceed enhancing the template.
- Copy-pasting is not wanted because the WYSIWYG editor may be immediately exported to Phrase with the suitable setup. Customers can edit immediately in our software, then export the report on to Phrase.
- Report Templates may be saved and later reused by many downstream studies.
Tiptap is a superb selection for this because it gives a large number of quality-of-life options that we will make obtainable to customers to enhance the person expertise. Thus, decreasing ache in curating and studying structured studies. Moreover, it additionally opens up house for brand new enhancements, akin to offering multi-user collaboration and additional customisations to enhance the studying and writing expertise.
Multimodal Inputs
On the time of writing, OpenAI lately launched a sequence of thrilling bulletins on new fashions. In a 26-minute demonstration, OpenAI confirmed off GPT-4o (“o” for “omni”), which is a step in the direction of rather more pure human-computer interplay. This mannequin accepts any mixture of textual content, audio, picture, and video as inputs and generates any mixture of textual content, audio, and picture as outputs. Crucially, since our strategy on this use case is thru in-context prompting, the improved tokeniser’s compression requires fewer tokens to course of the identical quantity of data.
That is notably thrilling for our use case. As we all know, writing studies requires an individual to synthesise totally different inputs akin to textual content, pictures/infographics, charts, and interview scripts. There have been some limitations to LLMs on their context window, token limits, and format of inputs, which made constructing a generic resolution for report writing a very troublesome engineering feat.
Extension to Era Varieties
Whereas the essential Era Varieties we’ve got outlined are fairly substantial and may cater to most repetitive studies, there are nonetheless much more ways in which the report writing course of may be automated and even empowered. We additionally considered different technology sorts that might doubtlessly be carried out:
- Chart Era: Outputs a chart utilizing a perform caller agent
- DataTable Era: Outputs a knowledge desk with a selected aggregation
- Temporal Era: Outputs a date, time, or period
- Graph Era: Outputs a graph that plots out relationships based mostly on given context
These new extensions not solely clear up current-day report technology issues however might additionally doubtlessly supercharge and alter the best way we write studies.
By the LAUNCH! Hackathon, we developed Fill.sg — an internet software powered by massive language fashions to automate report writing. By permitting customers to create reusable templates and generate studies from unstructured knowledge sources, Fill.sg saves substantial effort and time for all report-writing public officers.
AI is advancing quick, however enterprise logic is tougher to vary because it includes coverage issues. Given this, the final path for this software can be to retain the enterprise logic and person wants whereas constructing a versatile infrastructure and frontend expertise that permits it to incorporate potentialities from extra highly effective AI fashions and their peripheral tools.
Wanting forward, Fill.sg might benefit from new developments in multimodal AI that may perceive inputs past simply textual content, akin to pictures, audio, and video, doubtlessly elevating the software’s capabilities to unimaginable magnitudes.
Fill.sg represents a small step to attain our ambitions of leveraging AI to generate our studies. We hope that our learnings and experiences from this prototype will encourage different enterprising builders in authorities to develop and combine AI to raised serve public officers and residents.
LAUNCH! Is an innovation programme designed to rework nice concepts into impactful options for the general public sector. Spearheaded by GovTech in collaboration with numerous authorities businesses and esteemed business companions like Microsoft, Amazon Web Services (AWS), and Databricks, LAUNCH! is a motion in the direction of fostering a tradition of innovation and collaboration throughout the general public sector. public officers might join with the organisers at LAUNCH! to seek out out extra about contributing an concept or working a localised hackathon inside your group, division, perform, or organisation. You could entry the information web site on LAUNCH! through https://go.gov.sg/govtech-launch.
An enormous thanks to the Hackathon group who powered by means of the fulfilling 2 weeks: Chan Li Shing (Product Supervisor), Gawain Yeo (Enterprise Proprietor), James Teo (Information Engineer) and Nicole Ren (Information Engineer) in addition to our Customers who’ve offered invaluable suggestions!
Particular due to the next individuals who has contributed to the article: Alexia Lee (MSF) | Chan Li Shing (GovTech) | Gawain Yeo (MSF) | James Teo (GovTech) | Lim Hock Chuan (GovTech) | Mindy Lim (GovTech) | Nicole Ren (GovTech) | Terrance Goh (MSF)

