  Interactive tools make data analysis more efficient and more accessible to
end-users by hiding the underlying query complexity and exposing interactive
widgets for the parts of the query that matter to the analysis. However,
creating custom tailored (i.e., precise) interfaces is very costly, and
automated approaches are desirable. We propose a syntactic approach that uses
queries from an analysis to generate a tailored interface. We model interface
widgets as functions I(q) -> q' that modify the current analysis query $q$, and
interfaces as the set of queries that its widgets can express. Our system,
Precision Interfaces, analyzes structural changes between input queries from an
analysis, and generates an output interface with widgets to express those
changes. Our experiments on the Sloan Digital Sky Survey query log suggest that
Precision Interfaces can generate useful interfaces for simple unanticipated
tasks, and our optimizations can generate interfaces from logs of up to 10,000
queries in <10s.
