How to Create an App in Lega
As a Creator, you have the ability to create an app to use yourself or share with others. There are several ways to create an app. The following is meant to serve as a guide in your app-building journey.
Use the Lega Lab 🧪
Easily create an app from scratch, an import, or a template! You submit prompts, gauge responses, and edit your settings accordingly right from within the app creation experience. Share the final app with individual users or groups in the upper right hand corner.
Create an new app
Go to the Lega Lab and choose the Create a new app tile at the top of the page.
App Settings:
- First you'll give your new app a name and description. This is what appears to the end user in the app's tile in the App Library, so be sure to be clear about what the app is/does.
- Next you can optionally toggle these features on or off to enable them for users within an app. When a feature is enabled, it's highlighted blue.
- Document Upload - Allows users to upload (up to three) documents from their computer or the Document Manager for use within an app. See more about the Document Manager here.
- Voice Input - Allows users to interact with apps using their device's microphone.
- Internet Access - Allows the app to use web scraping to retrieve content from specific websites or pages. It does not use search but instead leverages existing web parsing capabilities. No data is shared outside of Lega with this functionality.
Model Settings: Use the down arrow next to Model Settings to expand the section and choose your settings.
- First choose your model from those available in the dropdown menu. See more information on model choices under Models in your Resource Library.
- Next use the sliding bars to optionally set Temperature, Max Tokens, and Top P.
- Temperature - controls predictability vs. creativity
- What it does: Adjusts how “creative” the AI is when generating responses. A low temperature means the LLM sticks closely to the most likely legal language and established precedents, while a high temperature allows for more variation and speculative reasoning.
- When to use:
- Low (0 - 0.2): For highly precise, fact-based legal documents, contract analysis, or when citing laws/cases.
- Medium (0.3 - 0.5): When drafting policy summaries, legal memos, or explaining legal concepts in plain language.
- High (0.6 - 1.0): For brainstorming legal arguments, generating alternative contract clauses, or exploring hypothetical scenarios.
- Use Case Examples:
- Drafting a contract? → Keep temperature low for accuracy.
- Exploring different negotiation strategies? → Increase temperature slightly to generate more varied suggestions.
- Max Tokens - controls response length
- What it does: Sets a limit on how long the LLM's response will be. Since legal language is often precise and verbose, selecting the right token limit ensures completeness without unnecessary fluff.
- When to use:
- Low (50 - 150): For quick legal definitions, contract clause suggestions, or short email responses.
- Medium (150 - 500): For memo summaries, case law explanations, or contract reviews.
- High (500+): For full legal document drafts or comprehensive legal document reviews.
- Use Case Examples:
- Need a concise summary of a Supreme Court ruling? → Medium max tokens (200-300).
- Want a full first draft of a contract? → High max tokens (750+)
- Just need a quick clause rewrite? → Low max tokens (100-150)
- Tip: If an answer gets cut off mid-sentence, increase the max tokens
- Top P - controls diversity of word choices (also called nucleus sampling)
- What it does: Limits how much randomness is introduced into the response. A low Top P keeps responses focused on the most likely (and legally sound) language, while a higher Top P introduces more varied word choices and alternative phrasings.
- When to use:
- Low (0.1 - 0.3): For strict legal compliance, court document drafts, contract clauses, and citations.
- Medium (0.4 - 0.7): For policy interpretation, legal education materials, or memo drafting.
- High (0.8 - 1.0): For brainstorming legal strategies, alternative arguments, or exploring new legal frameworks.
- Use Case Examples:
- Need a precise NDA clause? → Low Top P (0.2-0.3) to ensure standard legal phrasing
- Drafting a legal memo on regulatory trends? → Medium Top P (0.5-0.7) for a balance of structured reasoning and slight variation
- Brainstorming creative solutions for a client? → Higher Top P (0.8-1.0) to generate different approaches
Prompts:
- System Prompt - Optionally provide the model with additional instructions.
- Instructions - Provide a user with directions on how to use an app, which will appear as a chat bubble when the user first opens an app.
- Initial Prompt - Initial prompt to be submitted to the model, e.g. summarize this document. This can be as simple or complex as you like, and is editable by the app user. It can be a simple instruction to minimize the prompting by the user, e.g. "Please summarize the document attached," or a more complex instruction that initiates field to populate by the user through parameters.
- Parameters are placeholders in prompts that let you customize responses by inserting specific details when the prompt is used. For example, a parameter like
{{name}}
can be replaced with a user's name, making the app’s answers more tailored and dynamic. This helps create flexible prompts that adapt to different situations without needing to rewrite them each time. - To include parameters in your initial prompt, simply put the name of the parameter in double squiggle brackets {{ }}. You can use as many parameters in a prompt as needed. For example, if you want to add a parameter to the example prompt above, you might say: Please summarize this {{document}} into 3-5 sentences. Then click on the ⋯ and go to Edit Parameters tab to further define the parameter type.
- Label: This is what will appear above the field for the user to complete and is often the same as Name or something similar (e.g. First Name for first_name).
- Help: This will explain what should be entered by the user (e.g. Upload the document you want to be summarized).
- Type: This defines the parameter input. You can choose from string (short text), long text, number, date, choice (multiple options), document (attachment), and URL.
- Required: By checking this box, the user is required to complete the parameter field before sending the prompt to the model.
- You can also use a saved prompt as your initial prompt. Learn more about saved prompts here.
- Parameters are placeholders in prompts that let you customize responses by inserting specific details when the prompt is used. For example, a parameter like
Knowledge: Add an existing knowledge source to your app to make it a Retrieval-Augmented Generation (RAG) empowered solution that combines information retrieval systems with large language models (LLMs). See more about RAG solutions [here.]
Import an app config:
Upload a Lega app file or sandbox configuration exported from Azure AI, edit, and save as a new app.
Browse app templates:
Not sure where to start? Peruse our catalog of apps for inspiration and launch one you like!
Use the Lega Sandbox 💡
Compare models from the Lega Lab or go directly to the Lega Sandbox where you can compare models, prompts, and responses to find the best fit for your needs, and save the settings you like as an app.
Use the Resource Library ⚙️
- View details on available models and knowledge sources.
- Create, edit, and share prompts from the Prompt Library to efficiently reuse go-to prompts from within any app. User parameters as placeholders to make prompts adaptable to different situations without needing to rewrite them each time.
Note: You can also access the create an app from scratch, import or template functions from the "Create an app" button in the upper, right-hand corner of your App Library.